Skip to content

Add log line clarifying BinningAutoBatcher is initialization-only in optimize#489

Merged
CompRhys merged 4 commits intomainfrom
add-optimize-init-log-line
Mar 5, 2026
Merged

Add log line clarifying BinningAutoBatcher is initialization-only in optimize#489
CompRhys merged 4 commits intomainfrom
add-optimize-init-log-line

Conversation

@orionarcher
Copy link
Copy Markdown
Collaborator

@orionarcher orionarcher commented Mar 4, 2026

Summary

  • Adds a single logger.info call in optimize (runners.py) just before the _chunked_apply call that initializes optimizer state
  • Makes clear in logs that BinningAutoBatcher output during this step is one-time initialization, and that InFlightAutoBatcher will be used for the actual optimization loop

Motivation

Users reading logs saw BinningAutoBatcher output and were confused about which autobatcher was active during optimization. This one-line log message removes that ambiguity with no refactoring.

@orionarcher orionarcher changed the title Add log line clarifying BinningAutoBatcher is initialization-only in optimize Fix HDF5 file locking in reopen_trajectories; add optimize init log clarity Mar 4, 2026
@orionarcher orionarcher changed the title Fix HDF5 file locking in reopen_trajectories; add optimize init log clarity Add log line clarifying BinningAutoBatcher is initialization-only in optimize Mar 4, 2026
Drop self.trajectories references before opening new handles so CPython's
reference counting finalizes old HDF5 file objects before the new opens.
Remove the incomplete TODO workaround from TorchSimTrajectory.__init__ that
was a band-aid for the same issue.
@CompRhys CompRhys merged commit 74f9ec2 into main Mar 5, 2026
66 checks passed
@CompRhys CompRhys deleted the add-optimize-init-log-line branch March 5, 2026 00:08
@orionarcher
Copy link
Copy Markdown
Collaborator Author

@CompRhys this was not ready to merge as

        # TODO FIX THIS
        if hasattr(tables, "file") and (
            handles := tables.file._open_files.get_handlers_by_name(str(filename))
        ):
            list(handles)[-1].close()

was part of an incomplete second change. Next time can mark as draft. Will deal with file handling in a separate PR.

@CompRhys
Copy link
Copy Markdown
Member

CompRhys commented Mar 5, 2026

oops, I thought the deleted TODO was that the list creation above fixed any issue.

@orionarcher
Copy link
Copy Markdown
Collaborator Author

orionarcher commented Mar 5, 2026

unclear... I was having some HDF5 issues and this was the vibe coded solution that didn't actually fix the problem. More digging needed. Certainly possible these changes are valid but did not address my problem.

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.

2 participants