[BUG] neighbor_list behaves three different ways across backends (implemented / silently ignored / raising)
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python, pytorch, tensorflow
Hướng nghiên cứu
Bắt đầu với DeepEvalBackend.init và DeepEval.init trong deepmd/infer/deep_eval.py, DeepPot trong deepmd/infer/deep_pot.py và TestDeepPotNeighborList trong source/tests/infer/test_models.py. So sánh cách xử lý neighbor_list giữa các phần mở rộng backend đã được lập tài liệu, sau đó thiết lập và lập tài liệu cho một contract nhất quán. Công việc được xem là hoàn tất khi các docstring dùng chung và các test bao quát rõ ràng mọi phần mở rộng, bao gồm cả các mục ma trận trong tương lai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
neighbor_list is a documented keyword on DeepPot / DeepEval, but its behaviour depends on the model file extension in a way nothing surfaces to the caller. After #5858 there are three distinct outcomes:
| Backend / extension | Behaviour |
|---|---|
.pb (tf), .pt2 (pt_expt) |
Implemented — the ASE object is used to build the neighbor list |
.pth (pt), .pd, .dp, .savedmodel (jax) |
Accepted and silently ignored |
.savedmodeltf (tf2) |
Raises NotImplementedError (added by #5858) |
Note deepmd/pt/infer/deep_eval.py belongs in the silently-ignored group despite storing the value: its only read is ase_provided = self.neighbor_list is not None, so the ASE object itself never builds a neighbor list. pd, jax and dpmodel additionally document the parameter while ignoring it.
The silent-no-op cases are the harmful ones — a user passing a custom neighbor list gets the model's built-in one and results that look plausible.
Two concrete gaps
Docstrings promise it unconditionally. DeepEvalBackend.__init__ and DeepEval.__init__ in deepmd/infer/deep_eval.py, and DeepPot in deepmd/infer/deep_pot.py, all say:
The ASE neighbor list class to produce the neighbor list. If None, the neighbor list will be built natively in the model.
So DeepPot("model.savedmodeltf", neighbor_list=nl) is a documented call that now raises, and DeepPot("model.pth", neighbor_list=nl) is a documented call that quietly ignores the argument.
No test would catch the next backend. TestDeepPotNeighborList in source/tests/infer/test_models.py is parameterized to (".pb",) while the base TestDeepPot runs a four-way extension matrix:
A tf2-only "it raises" test cannot prevent recurrence; extending this matrix would.
Suggested direction
Decide the contract once, rather than per backend: either every backend that cannot honour neighbor_list raises NotImplementedError as tf2 now does, or the parameter is documented as advisory. Whichever is chosen, the shared docstrings should state it, and TestDeepPotNeighborList should cover every extension so a new backend inherits the expectation.
Raised while reviewing #5858, which deliberately scoped itself to the tf2 half.
- Ngôn ngữ chính
- Python
- Star
- 2.1k
- Fork
- 663
- Merge trung bình
- 3 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của deepmodeling/deepmd-kit
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
deepmodeling/deepmd-kit#6086 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Fine-tune descriptor mismatch warning should ignore seedCó thể đã có người làm @SiyuanChenToDo đã nhận 23 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
deepmodeling/deepmd-kit#6038 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Docs enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
deepmodeling/deepmd-kit#5766 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
branch: master lang: py todo comment type: todo
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
deepmodeling/deepmd-kit#5480 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
branch: master lang: toml todo comment type: todo
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
deepmodeling/deepmd-kit#5462 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của deepmodeling/deepmd-kit
Issue tương tự
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
gke-labs/kube-agents#5671 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(auth): Method B step 4 should tell users to tick "Use this client for an AI-powered agent"Đang mởdocumentation next-release v0.9.6
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
khuisman/mcp-gee-sweet#1446 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
In-box secret files written before their chmod: lc-creds, stacks tee, and the workspace tokenĐang mởmodel:sonnet runtime:claude security size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
FootprintAI/Containarium#3671 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
HolidayBase: reassigning `language` does not re-initialize translations or re-populate holidaysCó thể đã có người làm @shikhabhadoria đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vacanza/holidays#4116 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug CLI exec
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày