Skip to content

fix(main): remove dead HAS_HDF5 conditional gate#14

Merged
jdbloom merged 1 commit intomasterfrom
fix/main-py-has-hdf5
Apr 13, 2026
Merged

fix(main): remove dead HAS_HDF5 conditional gate#14
jdbloom merged 1 commit intomasterfrom
fix/main-py-has-hdf5

Conversation

@jdbloom
Copy link
Copy Markdown
Collaborator

@jdbloom jdbloom commented Apr 13, 2026

Summary

Fourth (and hopefully final) latent bug in Main.py from PR #10's incomplete pkl-removal cleanup.

`HAS_HDF5` was referenced at `Main.py:582` but never defined. Every job crashes at the end of episode 0 with:

```
NameError: name 'HAS_HDF5' is not defined
```

The conditional was a leftover from an earlier optional-h5py state. h5py is now a hard dependency of `src.hdf5_logger` (it's imported unconditionally at the top of that module), so the gate was always-true dead code. Removed.

Static check

Ran an AST scan to find ALL undefined names in Main.py before submitting this fix — `HAS_HDF5` is the only real one. Other apparent unknowns (`env_observations`, `action_num`, etc.) are false positives from tuple-unpack and except-binding patterns the simple walker doesn't track.

Test plan

  • Main.py syntax-check
  • Full RL-CT suite: 111/111 (excluding pre-existing `test_nan_guards.py`)
  • Static scan confirms no other undefined names

🤖 Generated with Claude Code

HAS_HDF5 was referenced at Main.py:582 but never defined, causing every
job to crash at the end of episode 0 with:

    NameError: name 'HAS_HDF5' is not defined

The conditional was a leftover from an earlier optional-h5py state. h5py
is now a hard dependency of src.hdf5_logger (it's imported unconditionally
at the top of that module), so the gate was always-true dead code.

Surfaced by the same smoke test that found the data_logger leftover.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jdbloom jdbloom merged commit 7d0819b into master Apr 13, 2026
3 checks passed
@jdbloom jdbloom deleted the fix/main-py-has-hdf5 branch April 13, 2026 11:26
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