Skip to content

fix(main): remove dangling data_logger reference left over from pkl removal#13

Merged
jdbloom merged 1 commit into
masterfrom
fix/main-py-dead-pkl-refs
Apr 13, 2026
Merged

fix(main): remove dangling data_logger reference left over from pkl removal#13
jdbloom merged 1 commit into
masterfrom
fix/main-py-dead-pkl-refs

Conversation

@jdbloom
Copy link
Copy Markdown
Collaborator

@jdbloom jdbloom commented Apr 13, 2026

Summary

PR #10 removed the `data_logger` import but missed two lines at `rl_code/Main.py:175-176` that still constructed a `data_writer` per episode. Every job crashes immediately at episode 0 with:

```
NameError: name 'data_logger' is not defined. Did you mean: 'exp_logger'?
```

Why this slipped through

The dead code was unreachable in tests (Main.py is the entry point, not directly tested). PR #10's tests covered the new `hdf5_writer` happy path but didn't end-to-end exercise Main.py against ARGoS. The bug was masked until today's smoke test of the new diagnostic logging stack on Stelaris main, which submits a real job through the dispatcher.

Fix

Delete the two lines. `data_writer` was constructed but never written to anywhere else in Main.py after the pkl removal, so the deletion has no behavioral side effect.

Test plan

  • Main.py syntax-check passes
  • Full RL-CT suite: 111/111 (excluding pre-existing `test_nan_guards.py` import error unrelated to this PR)
  • No remaining `data_logger` / `data_writer` / `.pkl` references in Main.py

🤖 Generated with Claude Code

…emoval

PR #10 (feat/hdf5-data-pipeline) removed the pkl writer import but missed
two lines that still constructed a data_writer per episode. Every job
crashes immediately at episode 0 with:

    NameError: name 'data_logger' is not defined

The two lines were dead code — data_writer was constructed but never
actually written to anywhere else in Main.py after the pkl removal.

Surfaced by a smoke test of the new diagnostic logging stack on Stelaris
main, which submits a real job through the dispatcher to RL-CT master.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jdbloom jdbloom merged commit 4c782fd into master Apr 13, 2026
@jdbloom jdbloom deleted the fix/main-py-dead-pkl-refs branch April 13, 2026 11:21
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