feat(models): add pipeline neighbor adaptation policy#119
Conversation
Add PipelineModelWrapper neighbor_adaptation and max_cutoff_ratio controls for sharing, splitting, or exactly grouping neighbor-list source cutoffs. Build per-step neighbor source plans, support composite neighbor hooks for multiple planned source lists, and cover the policy in docs, examples, changelog, and focused tests. Signed-off-by: Roman Zubatyuk <rzubatiuk@nvidia.com>
Greptile SummaryThis PR adds configurable neighbour-list source planning to
Important Files Changed
|
Raise an error when a pipeline planned for multiple neighbor-list sources is called without captured pipeline source data instead of falling back to the canonical batch neighbor tensors. Type make_neighbor_hooks() as returning Hook instances and add coverage for missing multi-source hook registration. Signed-off-by: Roman Zubatyuk <rzubatiuk@nvidia.com>
ALCHEMI Toolkit Pull Request
Description
Add configurable neighbor-list source planning to
PipelineModelWrapperso composed models can share, split, or exactly group source neighbor lists throughneighbor_adaptationandmax_cutoff_ratio. This avoids forcing every short-cutoff sub-model to adapt from the longest source list, because filtering a long-cutoff neighbor list down to a much shorter cutoff can be more expensive than building the short-cutoff list directly.Type of Change
Related Issues
None.
Changes Made
neighbor_adaptation("auto","always","never") andmax_cutoff_ratiooptions toPipelineModelWrapper.make_neighbor_hooks()to return either a singleNeighborListHookor a composite hook for multiple planned source lists.Testing
make pytest)make lint)Focused pipeline neighbor tests pass locally.
Checklist
Additional Notes
None.
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.