Benchmark Template
This directory provides scaffold files for adding a new benchmark to SkillOpt.
Files
env_template.py— Environment adapter template (subclassesEnvAdapter; implements the 4 abstract methods so the file is instantiable out of the box —reflectis inherited).loader_template.py— Data loader template (subclassesSplitDataLoader; implementsload_split_itemsfor.json/.jsonl).config_template.yaml— Config file template.
Usage
- Copy the directory:
cp -r skillopt/envs/_template skillopt/envs/your_benchmark - Rename the files (drop the
_templatesuffix):…and inside each file rename the classes (cd skillopt/envs/your_benchmark mv env_template.py adapter.py mv loader_template.py dataloader.pyTemplateBenchmarkEnv → YourBenchmarkAdapter,TemplateBenchmarkLoader → YourBenchmarkLoader) and fix the cross-import inadapter.py. - Implement the TODO blocks inside
adapter.py:rolloutand the_normalize_itemhelper indataloader.py. In addition to returningid/hard/soft, persist each non-empty trajectory at<out_dir>/predictions/<id>/conversation.json; the inheritedreflectmethod reads those files. Overridereflectonly for custom reflection logic. - Register the adapter — add matching
try / except ImportErrorblocks to_register_builtins()in bothscripts/train.pyandscripts/eval_only.py, mapping the registry key to yourYourBenchmarkAdapterclass. There is noBENCHMARK_REGISTRYdict inskillopt/envs/__init__.py; each CLI keeps its own lazy_ENV_REGISTRY. - Create the config at
configs/your_benchmark/default.yaml(start fromconfig_template.yaml)._base_is a string path, not a list.
See the Add a New Benchmark guide
for the full step-by-step with a worked docfaithful example.