Skip to content

fix(dpmodel): forward spin inputs in DeepEval#5852

Open
njzjz-bot wants to merge 2 commits into
deepmodeling:masterfrom
njzjz-bot:fix/dpmodel-deepeval-spin-inputs-5661
Open

fix(dpmodel): forward spin inputs in DeepEval#5852
njzjz-bot wants to merge 2 commits into
deepmodeling:masterfrom
njzjz-bot:fix/dpmodel-deepeval-spin-inputs-5661

Conversation

@njzjz-bot

Copy link
Copy Markdown
Contributor

Closes #5661.

Summary

  • normalize and validate spin inputs before automatic batching so flattened multi-frame inputs are sliced with their coordinate frames
  • forward extra model inputs through the dpmodel DeepEval adapter while keeping evaluator-owned inputs canonical
  • retain the magnetic-atom mask in non-atomic DeepPot results
  • add public-API regressions for forced one-frame batching and missing spin inputs

Why existing tests missed this

Existing dpmodel spin tests exercised direct model calls and serialization parity, not the DeepEval adapter. Public spin inference coverage targeted the PyTorch and PT2 backends, which already have dedicated spin forwarding paths. Those fixtures were also primarily single-frame, so they would not detect a flat spin tensor being left unsliced when automatic batching splits a multi-frame evaluation.

Validation

  • pytest source/tests/infer/test_dpmodel_deep_eval_spin.py -q (2 passed)
  • source/tests/common/test_auto_batch_size.py::TestAutoBatchSize::test_execute_all (passed)
  • dpmodel non-spin DeepEval smoke evaluation (passed)
  • ruff format . (1664 files unchanged)
  • ruff check . (passed)
  • git diff --check (passed)

Coding agent: Codex
Codex version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning effort: xhigh

Normalize spin tensors before automatic batching and pass supported extra
model inputs through the dpmodel evaluator. Preserve the magnetic mask in
non-atomic DeepPot results and add multi-frame regression coverage.

Coding-Agent: Codex
Codex-Version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
@dosubot dosubot Bot added the bug label Jul 16, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.33%. Comparing base (6c3b985) to head (c09d167).

Files with missing lines Patch % Lines
deepmd/dpmodel/infer/deep_eval.py 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5852      +/-   ##
==========================================
- Coverage   78.58%   78.33%   -0.26%     
==========================================
  Files        1050     1050              
  Lines      120637   120648      +11     
  Branches     4356     4357       +1     
==========================================
- Hits        94801    94504     -297     
- Misses      24278    24583     +305     
- Partials     1558     1561       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@njzjz

njzjz commented Jul 18, 2026

Copy link
Copy Markdown
Member

Possible reviewers based on changed lines, exact file history, and exact-file review history:

  • @wanghan-iapcm — 5 commits on changed files; 26 reviews on exact changed files (deepmd/dpmodel/infer/deep_eval.py).
  • @iProzd — 3 commits on changed files (deepmd/dpmodel/infer/deep_eval.py).

No review request was made automatically.

Coding agent: Codex
Codex version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning effort: xhigh

@njzjz
njzjz requested review from iProzd and wanghan-iapcm July 18, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Code scan] Forward spin inputs through the dpmodel DeepEval backend

2 participants