openenv-cloudsoc / _check_yaml.py
OpenEnv Contributor
fix: update score range to 0.1-0.9 per hackathon spec, add inference tests, update validator
cd7807c
Raw
History Blame Contribute Delete
1.36 kB
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}')