ES/03 checkpoint - #176
Conversation
…riable Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
…tputs Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
…rough for AFTER_STEP captures Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
…state_id Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
…ponent state Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
…d of skipped verification Signed-off-by: Samarjeet Prasad <p.samar.j@gmail.com>
Greptile SummaryThis PR introduces the enhanced-sampling API, built-in umbrella and wall biases, hook-driven biased dynamics, and transactional Zarr checkpoint/restore support. It also adds integrator state serialization and thermodynamic-state rebinding for the NVT integrators.
Important Files Changed
Reviews (1): Last reviewed commit: "Missing component checksums are now mani..." | Re-trigger Greptile |
| for index in range(frames.num_graphs): | ||
| frame = frames.index_select( | ||
| torch.tensor([index], device=frames.positions.device) | ||
| ) | ||
| for bias in adaptive.values(): | ||
| bias.update(frame, BiasResult()) # type: ignore[attr-defined] |
There was a problem hiding this comment.
When an adaptive bias uses energy, forces, stress, or observables from its preceding BiasResult, warm_start() passes an empty result for every historical frame instead of evaluating the bias, causing reconstructed history to differ from live sampling and potentially fail on missing result fields.
There was a problem hiding this comment.
Writing state transactionally and refusing to restore a torn store has nothing
to do with enhanced sampling. Training already implements it, MD restart wants
it, and NEB restart will want it. Shipping a second implementation under
enhanced_sampling/ is what guarantees a third.
# nvalchemi/_checkpoint.py
class Stateful(Protocol):
def state_dict(self) -> Mapping[str, Any]: ...
def load_state_dict(self, state: Mapping[str, Any]) -> None: ...
def save_checkpoint(path, components: Mapping[str, Stateful], *,
batch: Batch | None = None, compatibility=None) -> None: ...
def load_checkpoint(path, components: Mapping[str, Stateful], *, device=None) -> None: ...Hooks, integrators, biases and strategies all satisfy Stateful already, or
would under row 3. If refactoring training/_checkpoint.py onto this is too
much for the series, the minimum ask is that the new module lands at
nvalchemi/_checkpoint.py rather than inside enhanced_sampling/.
ALCHEMI Toolkit Pull Request
Exact checkpoint / restore: Zarr checkpoint format; BaseDynamics state_dict / load_state_dict / redistribute_state / apply_thermodynamic_state for NVTLangevin and NVTNoseHoover; transactional manifest; round-trip test
Type of Change
Related Issues
Changes Made
Testing
make pytest)make lint)Checklist
Additional Notes
Tip
This repository uses Greptile, an AI code review service, to help conduct
pull request reviews. We encourage contributors to read and consider suggestions
made by Greptile, but note that human maintainers will provide the necessary
reviews for merging: Greptile's comments are not a qualitative judgement
of your code, nor is it an indication that the PR will be accepted/rejected.
We encourage the use of emoji reactions to Greptile comments, depending on
their usefulness and accuracy.