fix(main): remove dead HAS_HDF5 conditional gate#14
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
🤖 Generated with Claude Code