From 54e4b3eafb4ee670ec711c80eea3f4f82f410bee Mon Sep 17 00:00:00 2001 From: Shunsuke Date: Tue, 9 Jun 2026 12:20:01 +0800 Subject: [PATCH] docs: align benchmark guide and template with dataloader.py naming The new-benchmark guide and the env template README referred to the data loader file as loader.py, but all six built-in benchmarks name it dataloader.py (skillopt/envs//dataloader.py). Update the docs and the template rename step to match the actual convention. Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/guide/new-benchmark.md | 4 ++-- skillopt/envs/_template/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guide/new-benchmark.md b/docs/guide/new-benchmark.md index 6d2f009a..41f986c7 100644 --- a/docs/guide/new-benchmark.md +++ b/docs/guide/new-benchmark.md @@ -36,7 +36,7 @@ touch skillopt/envs/docfaithful/__init__.py ## Step 2 — Implement the data loader -`skillopt/envs/docfaithful/loader.py`: +`skillopt/envs/docfaithful/dataloader.py`: ```python from __future__ import annotations @@ -165,7 +165,7 @@ import os from skillopt.datasets.base import BatchSpec from skillopt.envs.base import EnvAdapter -from skillopt.envs.docfaithful.loader import DocFaithfulDataLoader +from skillopt.envs.docfaithful.dataloader import DocFaithfulDataLoader from skillopt.envs.docfaithful.rollout import run_batch from skillopt.gradient.reflect import run_minibatch_reflect diff --git a/skillopt/envs/_template/README.md b/skillopt/envs/_template/README.md index 787efe24..83ffecab 100644 --- a/skillopt/envs/_template/README.md +++ b/skillopt/envs/_template/README.md @@ -21,14 +21,14 @@ This directory provides scaffold files for adding a new benchmark to SkillOpt. ```bash cd skillopt/envs/your_benchmark mv env_template.py adapter.py - mv loader_template.py loader.py + mv loader_template.py dataloader.py ``` …and inside each file rename the classes (`TemplateBenchmarkEnv → YourBenchmarkAdapter`, `TemplateBenchmarkLoader → YourBenchmarkLoader`) and fix the cross-import in `adapter.py`. 3. **Implement the TODO blocks** inside `adapter.py:rollout` and the - `_normalize_item` helper in `loader.py`. If you want real reflection, + `_normalize_item` helper in `dataloader.py`. If you want real reflection, uncomment the `run_minibatch_reflect` block in `adapter.py:reflect`. 4. **Register** the adapter — add a `try / except ImportError` block in `scripts/train.py`'s `_register_builtins()` mapping the registry key