Skip to content

Ship the data files inside the package - #37

Merged
YannBerthelot merged 1 commit into
mainfrom
rl/baselines-harness
Sep 11, 2026
Merged

YannBerthelot merged 1 commit into
mainfrom
rl/baselines-harness

Conversation

@YannBerthelot

Copy link
Copy Markdown
Owner

Reported from Colab: "No PID gains file found at
/usr/local/lib/python3.13/data/pid_gains.json. Running gradient-based tuning".

Two copies of the same bug. experts/pid.py computed parents[3] / "data" and provenance.py computed _ROOT.parent.parent / "data", both of which are the repository root from a source checkout and the interpreter's lib directory from site-packages. The wheel shipped packages = ["src/target_gym"] and no data at all, so every pip user silently re-ran gradient tuning on their first PID and got controllers that need not match the published baselines. That undermines the central claim of the project, which is that the recorded numbers are reproducible.

data/ now lives at src/target_gym/data/, resolves relative to the package, and ships in the wheel (verified: all four JSON files present). A clean install into a fresh venv builds a PID in 1.8 s with no tuning message, against minutes before.

scripts/tune_pid.py was writing to a path the loader no longer read, which would have been worse than the original bug: tuning would have appeared to succeed and changed nothing.

All twenty baselines re-recorded, since experts/pid.py is a _SHARED_SOURCE. Every number came back identical to the decimal, as expected for a change that moves a file rather than a computation.

Twenty-five prose references to the old data/ paths updated across the docs, tests and scripts. CHANGELOG and roadmap entries describing past states are left as they were.

…nds them

Reported from Colab: "No PID gains file found at
/usr/local/lib/python3.13/data/pid_gains.json. Running gradient-based tuning".

Two copies of the same bug. `experts/pid.py` computed `parents[3] / "data"` and
`provenance.py` computed `_ROOT.parent.parent / "data"`, both of which are the
repository root from a source checkout and the interpreter's lib directory from
site-packages. The wheel shipped `packages = ["src/target_gym"]` and no data at
all, so every pip user silently re-ran gradient tuning on their first PID and
got controllers that need not match the published baselines. That undermines the
central claim of the project, which is that the recorded numbers are
reproducible.

`data/` now lives at `src/target_gym/data/`, resolves relative to the package,
and ships in the wheel (verified: all four JSON files present). A clean install
into a fresh venv builds a PID in 1.8 s with no tuning message, against minutes
before.

`scripts/tune_pid.py` was writing to a path the loader no longer read, which
would have been worse than the original bug: tuning would have appeared to
succeed and changed nothing.

All twenty baselines re-recorded, since experts/pid.py is a _SHARED_SOURCE.
Every number came back identical to the decimal, as expected for a change that
moves a file rather than a computation.

Twenty-five prose references to the old `data/` paths updated across the docs,
tests and scripts. CHANGELOG and roadmap entries describing past states are left
as they were.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012WdRJEyGAZwKDD1EFwwH3U
@YannBerthelot
YannBerthelot merged commit 15b181f into main Sep 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant