Skip to content

fix(pt_expt): dispatch property models to DeepProperty inference - #5724

Merged
wanghan-iapcm merged 8 commits into
deepmodeling:masterfrom
wanghan-iapcm:fix-ptexpt-property-eval
Jul 9, 2026
Merged

fix(pt_expt): dispatch property models to DeepProperty inference#5724
wanghan-iapcm merged 8 commits into
deepmodeling:masterfrom
wanghan-iapcm:fix-ptexpt-property-eval

Conversation

@wanghan-iapcm

@wanghan-iapcm wanghan-iapcm commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Problem

Fixes #5671. A pt_expt property checkpoint could be constructed and trained by the backend stack but not evaluated. pt_expt DeepEval.model_type dispatched only energy, DOS, dipole, polar, and WFC outputs and then raised RuntimeError("Unknown model type") for a property model, and the evaluator did not expose the get_intensive / get_var_name / get_task_dim getters that DeepProperty needs. Underneath, the pt_expt PropertyModel itself only implemented get_var_name, not get_task_dim or get_intensive, so simply mirroring the dispatch would not have been enough.

Fix

  • pt_expt/model/property_model.py: add get_task_dim (fitting output dimension) and get_intensive (from the output def), mirroring the PyTorch property model.
  • pt_expt/infer/deep_eval.py: import DeepProperty, dispatch to it when the property variable name appears in the model output, and expose get_var_name / get_task_dim / get_intensive that delegate to the reconstructed model.

The dispatch branch and the getters are guarded by hasattr (and by self._dpmodel is not None), so:

  • energy/DOS/dipole/polar/WFC models keep matching their own branches first;
  • genuinely unknown model types still fall through to "Unknown model type" rather than raising an AttributeError;
  • metadata-only mode (no reconstructed dpmodel, used by the C++ AOTI path) raises a clear NotImplementedError for the property getters instead of mis-dispatching.

Test

Adds source/tests/pt_expt/infer/test_deep_eval_property.py, a full serialize -> .pte -> DeepEval round trip asserting model_type is DeepProperty, the three getters, and the eval output shape. Without the fix, constructing the DeepEval raises RuntimeError("Unknown model type").

Verification for the reviewer's peace of mind: pt-backend property inference works end to end via the same mechanism (dispatch + getters + eval), and the full pt_expt energy inference suite (source/tests/pt_expt/infer/test_deep_eval.py, 92 passed / 2 skipped) is unaffected by the added branch.

Summary by CodeRabbit

  • New Features
    • Added support for property-style models across inference backends, including correct model dispatch to property evaluation.
    • Exposed property metadata (variable name, task dimension, and intensive/extensive flag) via new public getters and preserved it through export/import.
  • Bug Fixes
    • Fixed single-output evaluation so results are wrapped consistently and mapped correctly to requested outputs.
    • Corrected atomic property tensor reshaping behavior for non-atomic evaluation.
  • Tests
    • Added end-to-end unit, JAX, and TF2 consistency tests covering dispatch, metadata getters, and output shapes/values.

A pt_expt property checkpoint could be built and trained but not evaluated:
pt_expt DeepEval.model_type dispatched only energy/DOS/dipole/polar/WFC and
raised RuntimeError("Unknown model type") for property outputs, and the
evaluator did not expose the property metadata getters DeepProperty needs.
Underneath, the pt_expt PropertyModel itself only implemented get_var_name, not
get_task_dim or get_intensive.

Add get_task_dim and get_intensive to the pt_expt PropertyModel (mirroring the
PyTorch model), import DeepProperty in the pt_expt evaluator and dispatch to it
when the property variable name appears in the model output, and expose
get_var_name / get_task_dim / get_intensive that delegate to the reconstructed
model. The dispatch and getters are guarded by hasattr so non-property and
unknown model types are unaffected (they keep matching their own branches or
fall through to "Unknown model type"), and the guard on self._dpmodel keeps
metadata-only mode (no reconstructed model) raising a clear NotImplementedError
rather than mis-dispatching.

Adds source/tests/pt_expt/infer/test_deep_eval_property.py, a full
serialize -> .pte -> DeepEval round trip asserting model_type is DeepProperty,
the three getters, and the eval output shape. Without the fix the DeepEval
construction raises "Unknown model type". Verified pt property inference works
end to end (same mechanism) and the pt_expt energy inference suite is unaffected.

Fix deepmodeling#5671
@dosubot dosubot Bot added the bug label Jul 3, 2026
@wanghan-iapcm
wanghan-iapcm requested a review from njzjz July 3, 2026 16:54
@github-actions github-actions Bot added the Python label Jul 3, 2026
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Property-model support is added across inference backends and export paths. DeepEval now recognizes property models, property metadata is exposed through new getters, serialization preserves that metadata, and tests cover dispatch plus global-versus-atomic evaluation behavior.

Changes

Property model inference support

Layer / File(s) Summary
Backend property metadata contracts and dispatch
deepmd/infer/deep_eval.py, deepmd/pt_expt/infer/deep_eval.py, deepmd/pt_expt/model/property_model.py, deepmd/dpmodel/model/property_model.py, deepmd/infer/deep_property.py
DeepEvalBackend becomes a concrete dispatcher including DeepProperty detection; get_var_name/get_task_dim/get_intensive are added to the base backend and property models; DeepProperty.eval reshaping changes around atomic outputs.
Export metadata plumbing (JAX/TF2)
deepmd/jax/model/hlo.py, deepmd/jax/utils/serialization.py, deepmd/tf2/utils/serialization.py
HLO gains property-model fields and getters; JAX and TF2 serialization persist var_name, task_dim, and intensive.
Inference wrapper dispatch and single-output eval normalization
deepmd/dpmodel/infer/deep_eval.py, deepmd/jax/infer/deep_eval.py, deepmd/tf2/infer/deep_eval.py
Backend-specific model_type properties are removed or centralized, TF2 wrapper gains property getters, and eval normalizes single outputs into tuples before zipping names.
Property model regression tests
source/tests/common/dpmodel/test_deep_eval_property.py, source/tests/pt_expt/infer/test_deep_eval_property.py, source/tests/consistent/test_deep_eval_property_tf2.py, source/tests/jax/test_deep_eval_property.py
New tests validate DeepProperty dispatch, metadata survival across export, and global-versus-atomic evaluation consistency for dpmodel, pt_expt, TF2, and JAX backends.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Suggested reviewers: iProzd, njzjz

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also changes dpmodel, jax, tf2, DeepProperty, and autobatching behavior beyond the pt_expt-only issue scope. Split the backend-wide and bug-fix changes into separate PRs, or link the broader issues they are meant to satisfy.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: routing pt_expt property models to DeepProperty.
Linked Issues check ✅ Passed The pt_expt changes add DeepProperty dispatch and the required metadata getters, matching issue #5671.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
deepmd/pt_expt/infer/deep_eval.py (1)

711-718: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Property dispatch requires the reconstructed dpmodel; metadata-only .pte/.pt2 property archives still hit RuntimeError("Unknown model type").

The new elif branch only fires when self._dpmodel is not None. In metadata-only mode (_init_from_metadata, used when model.json is absent), a property model's output type would still be present in model_output_type, but there is no get_var_name() to check against, so it falls through to raise RuntimeError("Unknown model type") — the exact error this PR intends to fix. This is consistent with the existing pattern that get_var_name/get_task_dim/get_intensive are also unavailable in metadata-only mode, so it's a known limitation rather than a regression, but the resulting generic error message will confuse users who hit it via a metadata-only archive.

💡 Optional: give metadata-only property models a clearer error
         elif (
             self._dpmodel is not None
             and hasattr(self._dpmodel, "get_var_name")
             and self._dpmodel.get_var_name() in model_output_type
         ):
             return DeepProperty
+        elif self._dpmodel is None and "task_dim" in self.metadata:
+            raise NotImplementedError(
+                "Property model dispatch requires the reconstructed dpmodel "
+                "(model.json); this archive was loaded in metadata-only mode."
+            )
         else:
             raise RuntimeError("Unknown model type")
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deepmd/pt_expt/infer/deep_eval.py` around lines 711 - 718, The property-type
dispatch in the model-type selection logic is too strict because it only checks
self._dpmodel.get_var_name() when self._dpmodel is available, so metadata-only
.pte/.pt2 archives fall through to the generic RuntimeError("Unknown model
type"). Update the dispatch around the self._dpmodel branch to handle
metadata-only property archives explicitly, either by recognizing the property
model from the available metadata/model_output_type path or by raising a
clearer, targeted error from this selector in DeepEval. Keep the fix localized
to the model-type resolution logic and preserve the existing behavior for
non-property models.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@deepmd/pt_expt/infer/deep_eval.py`:
- Around line 711-718: The property-type dispatch in the model-type selection
logic is too strict because it only checks self._dpmodel.get_var_name() when
self._dpmodel is available, so metadata-only .pte/.pt2 archives fall through to
the generic RuntimeError("Unknown model type"). Update the dispatch around the
self._dpmodel branch to handle metadata-only property archives explicitly,
either by recognizing the property model from the available
metadata/model_output_type path or by raising a clearer, targeted error from
this selector in DeepEval. Keep the fix localized to the model-type resolution
logic and preserve the existing behavior for non-property models.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5da33ea0-3592-4528-83f9-9761860d1752

📥 Commits

Reviewing files that changed from the base of the PR and between bbc3908 and d477393.

📒 Files selected for processing (3)
  • deepmd/pt_expt/infer/deep_eval.py
  • deepmd/pt_expt/model/property_model.py
  • source/tests/pt_expt/infer/test_deep_eval_property.py

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.31293% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.51%. Comparing base (0acd0e5) to head (fe2c86a).

Files with missing lines Patch % Lines
deepmd/jax/jax2tf/tfmodel.py 69.56% 7 Missing ⚠️
deepmd/infer/deep_eval.py 76.19% 5 Missing ⚠️
deepmd/jax/jax2tf/serialization.py 76.92% 3 Missing ⚠️
deepmd/jax/model/hlo.py 84.21% 3 Missing ⚠️
deepmd/pt_expt/infer/deep_eval.py 80.00% 3 Missing ⚠️
deepmd/tf2/utils/serialization.py 76.92% 3 Missing ⚠️
deepmd/tf2/infer/deep_eval.py 90.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5724      +/-   ##
==========================================
- Coverage   79.62%   79.51%   -0.12%     
==========================================
  Files        1014     1014              
  Lines      115533   115676     +143     
  Branches     4276     4272       -4     
==========================================
- Hits        91995    91981      -14     
- Misses      21994    22148     +154     
- Partials     1544     1547       +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-bot njzjz-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. I think this should be handled consistently across the DeepEval backends before merging.

This PR adds the DeepProperty dispatch and the property metadata getters for pt_expt, but the same gap still exists in the other backend DeepEval.model_type implementations I checked:

  • deepmd/dpmodel/infer/deep_eval.py
  • deepmd/jax/infer/deep_eval.py
  • deepmd/tf2/infer/deep_eval.py

Those backends still only dispatch energy / dos / dipole / polar / wfc, so a property model reaching the generic DeepEval(...) path would still raise Unknown model type. They also do not currently expose the get_var_name() / get_task_dim() / get_intensive() hooks needed by DeepProperty.change_output_def().

Please extend the same DeepProperty dispatch logic and metadata getter support to dpmodel, jax, and tf2 as well, with tests where the backend supports property inference. If any of these backends intentionally cannot support property models, please make that explicit in the code/tests/docs rather than leaving the same Unknown model type failure mode.

Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5)

@njzjz njzjz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

PR deepmodeling#5724 added property-model dispatch to the pt_expt evaluator only.
Review feedback asked for the same across the remaining backends, whose
generic DeepEval path still raised RuntimeError("Unknown model type") for
property models and did not expose get_var_name/get_task_dim/get_intensive.

Rather than copying the dispatch and getters into each backend, centralize
them in the shared DeepEvalBackend base: model_type is now a concrete
property that dispatches on the model output types (and the property
variable name via get_model()), and get_var_name/get_task_dim/get_intensive
delegate to get_model(). dpmodel, jax and tf2 drop their duplicated
model_type overrides and inherit this; pt and pt_expt keep their overrides
(extra branches / idiosyncratic model access). The property getters live
once on the dpmodel PropertyModel base, which the jax and tf2 model classes
already subclass, so they inherit them for free.

The jax HLO and tf2 SavedModel evaluators wrap an exported artifact with no
live model, so the property variable name, output dimension and
intensiveness are persisted into the StableHLO constants / SavedModel and
read back by the wrappers; HLO.model_output_def rebuilds the dynamic
property output def from that metadata. Non-property models store None and
are unaffected.

Enabling the dispatch surfaced two latent bugs, now fixed:
- DeepProperty.eval read the atomic output unconditionally; the dpmodel and
  jax backends omit it at atomic=False, so it now reads the reduced output
  for the global property and the atomic output only when atomic=True,
  mirroring DeepPot.eval.
- AutoBatchSize.execute_all unwraps a single-output result out of its tuple,
  which made the dpmodel/jax/tf2 eval zip iterate over the frame axis; the
  eval methods now re-wrap it. This also fixes multi-frame global-only DOS
  inference on these backends, which single-frame tests had masked.

Adds full serialize -> artifact -> DeepEval round-trip tests for each
backend (dpmodel, jax, tf2), asserting the DeepProperty dispatch, the three
getters, and that the multi-frame global property equals the atomic sum.
@wanghan-iapcm

Copy link
Copy Markdown
Collaborator Author

Addressed in 8198ae3 — extended property inference to all three backends (dpmodel, jax, tf2), each with a full serialize → artifact → DeepEval round-trip test asserting the DeepProperty dispatch, the three getters, and that the multi-frame global property equals the atomic sum.

Rather than copy the dispatch and getters into each backend, I centralized them in the shared DeepEvalBackend base: model_type is now a concrete property dispatching on the model output types (and the property var name via get_model()), and get_var_name/get_task_dim/get_intensive delegate to get_model(). dpmodel/jax/tf2 drop their duplicated model_type overrides and inherit this; pt/pt_expt keep theirs (extra branches / different model access). The property getters live once on the dpmodel PropertyModel, which the jax and tf2 model classes already subclass, so they inherit them for free. The jax HLO and tf2 SavedModel wrappers hold an exported artifact with no live model, so var_name/task_dim/intensive are persisted into the StableHLO constants / SavedModel and read back.

Enabling the dispatch surfaced two latent bugs that single-frame tests had masked, also fixed here: DeepProperty.eval read the atomic output unconditionally (KeyError at atomic=False on dpmodel/jax — now reads the reduced output for the global value, atomic only when atomic=True, mirroring DeepPot.eval); and AutoBatchSize.execute_all unwraps a single-output result out of its tuple, making the eval zip iterate over the frame axis (this also fixes multi-frame global-only DOS inference on these backends).

Comment thread deepmd/infer/deep_eval.py Fixed
Comment thread deepmd/infer/deep_eval.py Fixed
Comment thread deepmd/infer/deep_eval.py Fixed
Comment thread deepmd/infer/deep_eval.py Fixed
Comment thread deepmd/infer/deep_eval.py Fixed
Comment thread deepmd/infer/deep_eval.py Fixed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
deepmd/jax/model/hlo.py (1)

248-262: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Optional: align get_intensive fallback with the other property getters.

get_var_name and get_task_dim raise NotImplementedError when metadata is absent, but get_intensive always returns self._intensive (defaulting to False), so a non-property HLO model silently reports intensive=False instead of signaling "not a property model". Since the base DeepEvalBackend.get_intensive only probes hasattr(model, "get_intensive"), this masks the non-property case. Low impact today because it's only exercised for property models, but raising keeps the trio consistent.

♻️ Optional consistency tweak
     def get_intensive(self) -> bool:
         """Whether the property is intensive (property models only)."""
+        if self._var_name is None:
+            raise NotImplementedError
         return self._intensive
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deepmd/jax/model/hlo.py` around lines 248 - 262, `get_intensive` in the HLO
model should match the other property metadata getters by signaling when the
model is not a property model. Update the `get_intensive` method in `HLOModel`
so it raises `NotImplementedError` when the intensive flag metadata is absent,
instead of always returning `self._intensive`; keep the behavior consistent with
`get_var_name` and `get_task_dim`, and ensure any property-model initialization
path still sets the flag before this getter is used.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@deepmd/jax/model/hlo.py`:
- Around line 248-262: `get_intensive` in the HLO model should match the other
property metadata getters by signaling when the model is not a property model.
Update the `get_intensive` method in `HLOModel` so it raises
`NotImplementedError` when the intensive flag metadata is absent, instead of
always returning `self._intensive`; keep the behavior consistent with
`get_var_name` and `get_task_dim`, and ensure any property-model initialization
path still sets the flag before this getter is used.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4d153bcd-86af-4799-9895-c980e30c46fb

📥 Commits

Reviewing files that changed from the base of the PR and between d477393 and 8198ae3.

📒 Files selected for processing (12)
  • deepmd/dpmodel/infer/deep_eval.py
  • deepmd/dpmodel/model/property_model.py
  • deepmd/infer/deep_eval.py
  • deepmd/infer/deep_property.py
  • deepmd/jax/infer/deep_eval.py
  • deepmd/jax/model/hlo.py
  • deepmd/jax/utils/serialization.py
  • deepmd/tf2/infer/deep_eval.py
  • deepmd/tf2/utils/serialization.py
  • source/tests/common/dpmodel/test_deep_eval_property.py
  • source/tests/consistent/test_deep_eval_property_tf2.py
  • source/tests/jax/test_deep_eval_property.py

Han Wang added 4 commits July 8, 2026 16:43
The JAX HLO and TF2 SavedModel wrappers had byte-identical
get_var_name/get_task_dim/get_intensive accessors (return the persisted
value, raise if absent), and HLO inlined the property OutputVariableDef
construction. Extract a PropertyMetadataHolder mixin in dpmodel/output_def
that both wrap in, so the read-back accessors and the property-def builder
live once. Each artifact still sets _var_name/_task_dim/_intensive at
construction from its own source (StableHLO constants / SavedModel tensors),
which is the only genuinely per-backend part; the dpmodel PropertyModel is
unchanged since it computes these from the live fitting net rather than from
persisted values.
This reverts commit 9a3cc93.

The mixin abstracted three one-line accessors that just return a stored
value, so there is no logic that can drift out of sync between the JAX HLO
and TF2 SavedModel wrappers -- the divergence risk that motivates DRY is
essentially zero here. In exchange it added a mixin in dpmodel/output_def
(a module about output definitions, not artifact metadata) reached across
packages by both wrappers. The two small local getters are self-documenting
where they sit and cheaper to read than the shared indirection, so keep
them local. The DeepEvalBackend.model_type centralization is retained: that
one shares a dispatch decision that must stay consistent across backends.
The test computed INSTALLED_TF2 from a raw Backend availability check, which
is True in the main Python CI job (TensorFlow is installed). It therefore ran
there and failed with "tf2 backend requires TensorFlow eager execution" —
the tf v1 backend disables eager earlier in that job. Import INSTALLED_TF2
from consistent/common instead, which also requires RUN_TF2_BACKEND_TESTS
(DP_TEST_TF2_ONLY), so the test only runs in the tf2-only job and is skipped
elsewhere.
The three ad-hoc per-backend property tests (dpmodel/jax/tf2) were not
consistency tests -- the tf2 one in particular only lived under consistent/
because the tf2 CI job collects that directory. Replace them with a single
TestDeepProperty in consistent/io/test_io.py, the genuine cross-backend
DeepEval round trip: it serializes one property model, evaluates it through
every available backend and asserts they agree to 1e-12.

To support this, make IOTest.test_deep_eval arity-agnostic (split global vs
atomic outputs by the non-atomic return length instead of a hard-coded 3, so
it works for property's single output as well as energy's three) and add a
skip_backends hook (tf v1 has no property model).

Folding property into test_io surfaced that the jax2tf .savedmodel path
(TFModelWrapper) did not carry property metadata, unlike the .hlo path, so it
raised "Unknown model type". Persist var_name/task_dim/intensive into the
jax2tf SavedModel and read them back in TFModelWrapper, mirroring the .hlo and
.savedmodeltf paths, so all jax/tf2 export formats support property inference.
@wanghan-iapcm
wanghan-iapcm requested a review from njzjz July 8, 2026 11:31
… cycle

CodeQL flagged six cyclic imports: the centralized DeepEvalBackend.model_type
imported the concrete Deep* wrapper classes (deep_pot, deep_dos, ...), but
those modules import DeepEval from deep_eval, so referencing them from the base
forms an import cycle regardless of the deferral. The cycle-free home for
dispatch that names the Deep* wrappers is each backend's own module, which
lives in a separate package the wrappers do not import back.

Restore model_type as an abstractmethod on the base and re-add the concrete
dispatch (with the property branch) to the dpmodel, jax and tf2 evaluators,
importing the wrappers at the top level as before. The shared
_get_property_var_name helper and the get_var_name/get_task_dim/get_intensive
getters stay on the base -- they delegate to get_model() and import nothing, so
they cause no cycle and keep the getter logic in one place.

@njzjz-bot njzjz-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this addresses the earlier cross-backend concern. The property dispatch is now covered for pt_expt, dpmodel, jax, and tf2; the single-output eval wrapping issue is handled; and the cross-backend IO test covers the intended round trip while skipping tf v1 where unsupported.

CI is green on the latest commit, and the prior CodeQL cyclic-import issue is resolved by keeping dispatch in each backend module.

Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5)

@njzjz
njzjz added this pull request to the merge queue Jul 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jul 8, 2026
…ty-eval

# Conflicts:
#	deepmd/jax/model/hlo.py
@wanghan-iapcm
wanghan-iapcm enabled auto-merge July 9, 2026 11:04
@wanghan-iapcm
wanghan-iapcm added this pull request to the merge queue Jul 9, 2026
Merged via the queue into deepmodeling:master with commit 1fa7f71 Jul 9, 2026
57 checks passed
@wanghan-iapcm
wanghan-iapcm deleted the fix-ptexpt-property-eval branch July 9, 2026 18:48
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] Dispatch pt_expt property models to DeepProperty

4 participants