File size: 1,363 Bytes
cd7807c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import yaml

with open('openenv.yaml', encoding='utf-8') as f:
    content = f.read()
    
# Check if YAML is valid
try:
    data = yaml.safe_load(content)
    print('βœ“ YAML is valid')
except Exception as e:
    print(f'βœ— YAML parsing error: {e}')
    exit(1)

# Check tasks
tasks = data.get('tasks', [])
print(f'βœ“ Found {len(tasks)} tasks')

# Check if each task has a grader
for task in tasks:
    task_id = task.get('id', 'UNKNOWN')
    grader = task.get('grader')
    if not grader:
        print(f'βœ— Task "{task_id}" missing grader')
    else:
        print(f'βœ“ Task "{task_id}" has grader: {grader}')

# Check environment section
env = data.get('environment', {})
print(f'βœ“ Environment config present')

# Check hardware requirements
hw = data.get('hardware', {})
print(f'βœ“ Hardware config: min_vcpu={hw.get("min_vcpu")}, min_ram_gb={hw.get("min_ram_gb")}')

# Check if external_db is needed (should be false for Zero-DB)
ext_db = hw.get('external_db_required', None)
print(f'βœ“ External DB required: {ext_db}')

# Check evaluation criteria
eval_crit = data.get('evaluation_criteria', {})
print(f'βœ“ Evaluation criteria present: {bool(eval_crit)}')

# Check task completion criteria
comp_criteria = eval_crit.get('task_completion_criteria', {})
if comp_criteria:
    for key, val in comp_criteria.items():
        print(f'  - {key}: {val}')