You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs(inference): explain neighbor search in Python and ASE - #6156
Document nlist_backend for the PyTorch Exportable backend, optional search libraries and the separate neighbor_graph_method used by graph-form models. Include examples for DeepPot and the ASE calculator.
Verified auto, native and vesin with frozen .pt2 and .pte water models in Python and ASE. Also checked the missing-library diagnostic and the error for an incompatible graph input.
Added guidance on choosing a neighbor-search backend for frozen .pt2 and .pte models, including available options and how automatic selection works for single frames and batches.
Clarified installation requirements and error handling for Vesin, and documented which model types support neighbor-list configuration.
Explained how graph-form and edge-vector models interact with neighbor-search settings.
Renamed the TensorFlow subsection to “External neighbor list.”
No actionable comments were generated in the recent review.
Walkthrough
The Python inference documentation updates its neighbor-search section and describes backend selection for frozen .pt2 and .pte models, including supported options, dependency requirements, and parameter constraints.
The section heading changes. New guidance describes "auto", "native", "vesin", and "nv" options, Vesin’s dependency requirement and missing-bindings error, and parameter constraints for graph-form and edge-vector models.
This is a documentation-only update on neighbor-list backend selection for Python and ASE inference. It does not change runtime behavior, so merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "docs(inference): explain neighbor search in Python and ASE" matches the main change. The summary and objectives show the PR documents the nlist_backend option (auto, native, vesin, nv) for …
Linked Issues check
[#5922] The issue asks for Python/ASE documentation of nlist_backend for the PyTorch Exportable backend. The reviewed head of doc/inference/python.md covers these points: - The "Choosing a neighbor se…
Out of Scope Changes check
The change set is limited to doc/inference/python.md. Every added item maps to #5922 scope: nlist_backend, the optional vesin dependency and its missing-library error, neighbor_graph_method for gr…
Full details: Title check
Explanation
The title "docs(inference): explain neighbor search in Python and ASE" matches the main change. The summary and objectives show the PR documents the nlist_backend option (auto, native, vesin, nv) for Python and ASE inference, the optional vesin package and its ImportError behavior, and how graph-form models interact with neighbor_graph_method. The title is specific and concise, and it follows the conventional docs() prefix.
Full details: Linked Issues check
Explanation
[#5922] The issue asks for Python/ASE documentation of nlist_backend for the PyTorch Exportable backend. The reviewed head of doc/inference/python.md covers these points:
The "Choosing a neighbor search" section keeps the TensorFlow "External neighbor list {{ tensorflow_icon }}" content and its ase.neighborlist.NewPrimitiveNeighborList example.
The "PyTorch Exportable neighbor lists {{ pytorch_icon }}" subsection covers .pt2 and .pte models.
The table lists "auto", "native", "vesin", and "nv". deepmd/pt_expt/infer/deep_eval.py_setup_neighbor_backend accepts exactly these values. The "nv" row is a real option. It goes beyond the three values named in #5922, but it belongs to the same argument, so documenting it does not break scope.
The "vesin" row names the optional vesin[torch]>=0.6 install and the ImportError for an explicit request without Torch bindings. The exact error text was not verified in this review.
The examples DeepPot("model.pt2", nlist_backend="vesin") and DP(model="model.pt2", nlist_backend="vesin") match the DeepEval signature. The ASE calculator forwards nlist_backend to DeepPot.
The graph-form note says neighbor_graph_method selects the graph builder and that a non-default nlist_backend raises ValueError. The issue text says graph-form models ignore the setting. The current code raises ValueError for graph-routed artifacts instead. The doc follows the code, so the current requirement is met.
The "auto" rule (Vesin for one frame, NV for batches, native fallback) matches the deep_eval.py docstring. The truncated read did not cover the full selection branch, so the exact branch order is not independently confirmed.
No coding requirement in #5922 remains unmet. The issue is documentation-only, so no automated test requirement applies. The incremental diff could not be read, so this verdict rests on a full read of the reviewed head file and the code evidence above.
Full details: Out of Scope Changes check
Explanation
The change set is limited to doc/inference/python.md. Every added item maps to #5922 scope: nlist_backend, the optional vesin dependency and its missing-library error, neighbor_graph_method for graph-form models, and DeepPot and ASE examples. The additional "nv" row and the edge-vector note describe options that deep_eval.py accepts for the same argument, so they are related documentation. The doc does not cover LAMMPS neighbor lists, which the issue excludes. The TensorFlow content is retained. The incremental diff could not be read, so this verdict rests on the full file read at head and the code evidence for the documented options.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: f70011ad-7555-4376-a640-52ec0ac3648c
Commits
Reviewing files that changed from the base of the PR and between baefc10 and a8522ae.
Files selected for processing: 1
doc/inference/python.md
Files skipped from review as they are similar to previous changes: 1
doc/inference/python.md
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.
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
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.
Document
nlist_backendfor the PyTorch Exportable backend, optional search libraries and the separateneighbor_graph_methodused by graph-form models. Include examples forDeepPotand the ASE calculator.Verified
auto,nativeandvesinwith frozen.pt2and.ptewater models in Python and ASE. Also checked the missing-library diagnostic and the error for an incompatible graph input.Closes #5922.
Summary by CodeRabbit
.pt2and.ptemodels, including available options and how automatic selection works for single frames and batches.