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
## Summary
- Add `eval_typeebd`, `eval_descriptor`, `eval_fitting_last_layer` to
pt_expt's `DeepEval`, using the eager `_dpmodel` for diagnostic
computation
- Add `get_dp_atomic_model()` API to the model hierarchy (make_model,
FrozenModel, SpinModel) for clean access to the underlying
`DPAtomicModel`
- Add `set_return_middle_output` to `GeneralFitting` with proper
`FittingOutputDef` registration — `fitting_check_output` now evaluates
`output_def()` dynamically
- Preserve `middle_output` through DipoleFitting/PolarFitting `call()`
by modifying the results dict in-place
- Add cross-backend reference values for fparam_aparam model (descriptor
+ fit_ll)
- Remove .pte/.pt2 skips in `test_models.py` for `test_descriptor` and
`test_fitting_last_layer`
## Limitations
- Spin models: `eval_descriptor` and `eval_fitting_last_layer` raise
`NotImplementedError` (SpinModel preprocesses coords with virtual atoms)
- DPZBLModel: `get_dp_atomic_model()` returns `None` (LinearAtomicModel
has no single descriptor/fitting_net)
- `model_check_output` still caches `output_def` at init (only
`fitting_check_output` is dynamic) — not an issue since `middle_output`
is consumed at fitting level
- `_middle_output_def()` added to all fitting subclasses but only tested
for InvarFitting, DipoleFitting, PolarFitting (not PropertyFitting,
DOSFitting)
## Test plan
- [x] 10 dpmodel middle_output tests (shape, toggle, output_def
registration, decorator validation, dipole/polar passthrough)
- [x] 6 eval diagnostic tests (typeebd, descriptor, fitting_last_layer
for se_e2_a and DPA1)
- [x] 4 get_dp_atomic_model tests (energy, ZBL, spin, frozen)
- [x] 3 spin model diagnostic tests (typeebd works, descriptor/fitting
raises)
- [x] 2 ASE neighbor list consistency tests
- [x] Cross-backend consistency via fparam_aparam reference values in
test_models.py
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Inference APIs now expose type-embedding, descriptor, and
fitting-last-layer outputs; models may return intermediate
fitting-network outputs and higher-level fitters propagate them.
* New public accessor to retrieve an underlying atomic model from
wrapped models.
* **Refactor**
* Consolidated input preparation and evaluation flow; multi-output
handling and output-definition validation unified.
* **Tests**
* Large expansion of unit and integration tests and test data for new
outputs, toggles, determinism, and model variants.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
0 commit comments