Skip to content

Initialize ACEnv.supermoves to fix the checkpoint-save crash - #7

Open
hmirin wants to merge 1 commit into
shehper:mainfrom
hmirin:fix-checkpoint-supermoves-crash
Open

Initialize ACEnv.supermoves to fix the checkpoint-save crash#7
hmirin wants to merge 1 commit into
shehper:mainfrom
hmirin:fix-checkpoint-supermoves-crash

Conversation

@hmirin

@hmirin hmirin commented Jul 23, 2026

Copy link
Copy Markdown

Fixes #6.

ACEnv.__init__ stopped initializing self.supermoves when the supermoves implementation was removed from the environment in 89b44fa, while the checkpoint-saving code in training.py still reads envs.envs[0].supermoves — so any run reaching update 100 crashes with an AttributeError at the first checkpoint save. See #6 for the full analysis and a minimal reproduction.

This restores the pre-refactor self.supermoves = None initialization. Since the attribute is not read anywhere in step/reset, it only affects checkpoint metadata, not training dynamics.

Verified on this branch, per Contributions.md:

Happy to also add a fast checkpoint-path smoke test to tests/ if you'd like it in this PR.

training.py reads envs.envs[0].supermoves when saving a checkpoint
(every 100 updates), but ACEnv.__init__ stopped setting the attribute
when the supermoves implementation was removed in 89b44fa, so any run
reaching update 100 crashed with an AttributeError at the first
checkpoint save. Restore the pre-refactor initialization.

See shehper#6 for the full analysis and reproduction.
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.

Checkpoint saving always crashes: AttributeError: 'ACEnv' object has no attribute 'supermoves'

1 participant