Skip to content

feat(tf): support training stat_file#5551

Open
njzjz-bot wants to merge 10 commits into
deepmodeling:masterfrom
njzjz:openclaw/fix-tf-stat-file-4017
Open

feat(tf): support training stat_file#5551
njzjz-bot wants to merge 10 commits into
deepmodeling:masterfrom
njzjz:openclaw/fix-tf-stat-file-4017

Conversation

@njzjz-bot

@njzjz-bot njzjz-bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Problem

Change

  • Port the TF stat_file plumbing onto current master: create/open DPPath, pass it through DPTrainer.build() and Model.data_stat(), and save/load energy statistics under the PyTorch-compatible type-map subdirectory.
  • Keep TensorFlow's internal bias_atom_e as the historical 1-D vector while storing stat files in the cross-backend (ntypes, 1) format.
  • Note the intentional TF behavior change: energy-bias initialization now uses the shared dpmodel/PyTorch per-frame regression path even when training.stat_file is not set. This can differ from legacy TF's per-system weighting for unequal-frame systems, but keeps freshly computed TF stats consistent with restored cross-backend stat files.
  • Add TF and TF/PT consistency coverage derived from feat(tf): add support for stat_file parameter #4926.

Notes

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

Summary by CodeRabbit

  • New Features

    • Added training.stat_file configuration option to save training statistics during training. Statistics can be saved to an HDF5 file or directory structure.
  • Tests

    • Added tests to verify training statistics file creation and ensure consistency across different backends.

Allow TensorFlow training to accept training/stat_file and reuse saved energy statistics in the same type-map directory layout as PyTorch. This ports the useful part of PR deepmodeling#4926 onto current master and keeps TensorFlow's 1-D fitting bias shape internally.

Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5)
@dosubot dosubot Bot added the new feature label Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 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

Adds training.stat_file support to the TensorFlow backend. The data_stat method signature is extended with an optional stat_file_path: DPPath | None parameter across the entire TF model hierarchy. EnerModel gains save/restore logic using backend-agnostic utilities. The training entrypoint creates the stat file or directory on the chief rank and threads it through DPTrainer.build. The stat_file argument doc is de-marked as PyTorch-only. Unit, integration, and cross-backend consistency tests are added.

Changes

TF stat_file feature

Layer / File(s) Summary
Model hierarchy data_stat signature propagation
deepmd/tf/model/model.py, deepmd/tf/model/dos.py, deepmd/tf/model/tensor.py, deepmd/tf/model/frozen.py, deepmd/tf/model/linear.py, deepmd/tf/model/pairwise_dprc.py
Adds optional stat_file_path: DPPath | None = None to data_stat in the Model base class and all concrete model subclasses; LinearModel and PairwiseDPRc derive sub-model or qm/qmmm subpaths and forward the argument recursively.
EnerModel stat save/restore integration
deepmd/tf/model/ener.py
Imports backend-agnostic compute_output_stats, _restore_observed_type_from_file, _save_observed_type_to_file, collect_observed_types; adds _pack_stat_batches and _save_observed_types_to_file helpers; extends _compute_output_stat to namespace path by type_map, save/restore observed types, call compute_output_stats with keys=["energy"], and update fitting.bias_atom_e from the returned bias.
Trainer and entrypoint stat_file_path wiring
deepmd/tf/train/trainer.py, deepmd/tf/entrypoints/train.py
DPTrainer.build gains a stat_file_path parameter forwarded to model.data_stat; the entrypoint reads training.stat_file, creates an HDF5 file or directory on the chief rank, wraps it as DPPath(..., "a"), and passes it into model.build.
argcheck doc fix and unit/integration/consistency tests
deepmd/utils/argcheck.py, source/tests/tf/test_stat_file.py, source/tests/tf/test_stat_file_integration.py, source/tests/consistent/test_stat_file.py
Removes the PyTorch-only doc prefix from training.stat_file; adds a TF unit test verifying stat directory creation via _do_work, an integration test running train(...) end-to-end, and a cross-backend consistency test comparing TF and PT stat file structures and array values.

Sequence Diagram(s)

sequenceDiagram
    participant Entrypoint as train.py _do_work
    participant DPTrainer as DPTrainer.build
    participant EnerModel as EnerModel._compute_output_stat
    participant StatUtil as compute_output_stats
    participant FS as DPPath / Filesystem

    Entrypoint->>FS: Read training.stat_file from jdata
    Entrypoint->>FS: Chief rank creates empty HDF5 or directory
    Entrypoint->>Entrypoint: Wrap as DPPath(stat_file_raw, "a")
    Entrypoint->>DPTrainer: model.build(..., stat_file_path=DPPath)
    DPTrainer->>EnerModel: model.data_stat(data, stat_file_path=DPPath)
    EnerModel->>EnerModel: _pack_stat_batches → samples
    EnerModel->>FS: _save_observed_types_to_file (restore or compute+save)
    EnerModel->>StatUtil: compute_output_stats(samples, stat_file_path, keys=["energy"])
    StatUtil->>FS: Restore bias/std arrays if they exist
    alt Files missing
        StatUtil->>FS: Compute and save bias/std arrays
    end
    StatUtil-->>EnerModel: bias_out["energy"]
    EnerModel->>EnerModel: fitting.bias_atom_e ← flattened bias
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • deepmodeling/deepmd-kit#5269: Adds DP/PT utilities to save and restore observed atom types to/from the stat file — the same _save_observed_type_to_file / _restore_observed_type_from_file functions that this PR now calls from EnerModel.

Suggested reviewers

  • njzjz
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.89% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(tf): support training stat_file' accurately and concisely describes the main change—adding stat_file support to the TensorFlow backend.
Linked Issues check ✅ Passed All coding requirements from issue #4017 are met: the PR implements stat_file support for TensorFlow, maintaining compatibility with PyTorch formats and enabling the feature across the TensorFlow backend.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing stat_file support for TensorFlow, including core plumbing, data storage, compatibility layers, and comprehensive test coverage.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@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.

Actionable comments posted: 7

🤖 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.

Inline comments:
In `@deepmd/tf/entrypoints/train.py`:
- Around line 247-252: The code at lines 247-252 fails for nested paths because
parent directories are not created before attempting to initialize the stat file
target. Before the conditional block that checks if stat_file_raw exists, ensure
all parent directories are created using
Path(stat_file_raw).parent.mkdir(parents=True, exist_ok=True). This will create
the full directory hierarchy needed before attempting either the h5py.File()
call for HDF5 files or the Path(stat_file_raw).mkdir() call for directory
creation. The parents=True parameter ensures intermediate directories are
created, and exist_ok=True prevents errors if directories already exist.

In `@deepmd/tf/model/linear.py`:
- Around line 98-103: The data_stat method passes the same stat_file_path to all
child models in the loop, which causes later submodels to incorrectly reuse
previously saved statistics from earlier submodels. Modify the data_stat method
to namespace the stat_file_path for each model by appending a unique identifier
(such as the model index or model name) to the original path before passing it
to model.data_stat(). This ensures each model in self.models writes to and reads
from its own separate stat file.

In `@deepmd/tf/model/pairwise_dprc.py`:
- Around line 325-327: The data_stat method in the pairwise_dprc.py file passes
the same stat_file_path to both qm_model.data_stat() and qmmm_model.data_stat()
calls, which can cause one model to load the other's statistics instead of
computing its own. Modify the stat_file_path parameter for each call to use
separate namespaces or identifiers that distinguish between QM and QMMM models,
ensuring each model loads or computes its own statistics independently.

In `@deepmd/tf/utils/stat.py`:
- Around line 16-19: The functions `_restore_from_file` and
`compute_output_stats` use a mutable default argument `keys=["energy"]` which
triggers Ruff B006 violations. Replace the mutable default list with `keys=None`
in both function signatures, then at the beginning of each function body, add a
check to initialize `keys` to `["energy"]` if it is `None` (e.g., using `if keys
is None: keys = ["energy"]`). Since the parameter is only read and never
mutated, this change is safe and will resolve the Ruff violations.

In `@source/tests/consistent/test_stat_file.py`:
- Around line 115-117: The subprocess.run() call in the test does not include a
timeout parameter, which can cause the test to hang indefinitely if the CLI
command stalls. Add a timeout parameter to the subprocess.run() call to ensure
the test completes within a reasonable timeframe and fails gracefully if the
subprocess takes too long to complete.
- Around line 212-220: The tearDown method is deleting files from the current
working directory without proper scoping, which can remove artifacts created by
other tests or processes. Create a test-specific temporary directory in the
setUp method that is unique to this test instance, configure the test to write
its outputs to this directory, and modify the tearDown method to only clean up
files within this test-specific directory. This ensures that the cleanup in
tearDown is isolated and does not interfere with shared cwd artifacts or other
concurrent tests.

In `@source/tests/tf/test_stat_file_integration.py`:
- Around line 99-103: The current assertion in the stat_path validation block is
conditional on stat_path.exists(), which means if the stat_file is never
created, the assertion is skipped entirely and the test passes without detecting
the failure. Remove the if stat_path.exists() condition and instead assert
unconditionally that the stat_path both exists and is a directory. This ensures
that when the training.stat_file creation is broken, the test will properly fail
rather than silently passing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 23d2b3aa-2fce-44a0-8c17-e0bda3504fd0

📥 Commits

Reviewing files that changed from the base of the PR and between a4c5592 and 650ed47.

📒 Files selected for processing (14)
  • deepmd/tf/entrypoints/train.py
  • deepmd/tf/model/dos.py
  • deepmd/tf/model/ener.py
  • deepmd/tf/model/frozen.py
  • deepmd/tf/model/linear.py
  • deepmd/tf/model/model.py
  • deepmd/tf/model/pairwise_dprc.py
  • deepmd/tf/model/tensor.py
  • deepmd/tf/train/trainer.py
  • deepmd/tf/utils/stat.py
  • deepmd/utils/argcheck.py
  • source/tests/consistent/test_stat_file.py
  • source/tests/tf/test_stat_file.py
  • source/tests/tf/test_stat_file_integration.py

Comment thread deepmd/tf/entrypoints/train.py Outdated
Comment thread deepmd/tf/model/linear.py
Comment thread deepmd/tf/model/pairwise_dprc.py Outdated
Comment thread deepmd/tf/utils/stat.py Outdated
Comment thread source/tests/consistent/test_stat_file.py
Comment thread source/tests/consistent/test_stat_file.py Outdated
Comment thread source/tests/tf/test_stat_file_integration.py Outdated
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.22%. Comparing base (4a552e3) to head (0419763).
⚠️ Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
deepmd/tf/fit/dos.py 23.07% 10 Missing ⚠️
deepmd/tf/descriptor/stat.py 96.15% 3 Missing ⚠️
deepmd/tf/model/linear.py 40.00% 3 Missing ⚠️
deepmd/tf/entrypoints/train.py 87.50% 2 Missing ⚠️
deepmd/tf/fit/stat.py 97.56% 1 Missing ⚠️
deepmd/tf/model/dos.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5551      +/-   ##
==========================================
- Coverage   82.23%   82.22%   -0.01%     
==========================================
  Files         894      902       +8     
  Lines      102002   103753    +1751     
  Branches     4276     4433     +157     
==========================================
+ Hits        83877    85316    +1439     
- Misses      16823    17043     +220     
- Partials     1302     1394      +92     

☔ 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 and others added 2 commits June 18, 2026 17:21
Persist observed_type for TensorFlow stat files and normalize the
stat-file test input before calling the lower-level training helper.
Also broadcast the global output std to match the shared statistic logic.

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

@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)
source/tests/tf/test_stat_file_integration.py (1)

30-31: ⚡ Quick win

Align test intent with assertions.

test_stat_file_save_and_load currently validates config acceptance and directory creation, but not a load path. Either rename the test/docstring to match current scope or add an assertion that exercises restore semantics.

Suggested minimal rename
-    def test_stat_file_save_and_load(self) -> None:
-        """Test that stat_file can be saved and loaded in TF training."""
+    def test_stat_file_path_is_accepted_and_created(self) -> None:
+        """Test that TF training accepts training.stat_file and creates its directory."""

Also applies to: 107-110

🤖 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 `@source/tests/tf/test_stat_file_integration.py` around lines 30 - 31, The test
method `test_stat_file_save_and_load` has a docstring claiming it validates both
save and load functionality, but the current implementation only tests config
acceptance and directory creation without actually exercising the load/restore
path. Either rename the test method and its docstring to accurately reflect the
current scope (e.g., something like test_stat_file_config_acceptance or
test_stat_file_save), or add assertions that verify the restore semantics by
actually loading and validating the saved stat_file data after the save
operation.
🤖 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 `@source/tests/tf/test_stat_file_integration.py`:
- Around line 30-31: The test method `test_stat_file_save_and_load` has a
docstring claiming it validates both save and load functionality, but the
current implementation only tests config acceptance and directory creation
without actually exercising the load/restore path. Either rename the test method
and its docstring to accurately reflect the current scope (e.g., something like
test_stat_file_config_acceptance or test_stat_file_save), or add assertions that
verify the restore semantics by actually loading and validating the saved
stat_file data after the save operation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3d3940c2-03e6-4c88-b0b0-4cd8fded6d59

📥 Commits

Reviewing files that changed from the base of the PR and between 3eb2243 and f676e43.

📒 Files selected for processing (3)
  • source/tests/consistent/test_stat_file.py
  • source/tests/tf/test_stat_file.py
  • source/tests/tf/test_stat_file_integration.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • source/tests/tf/test_stat_file.py
  • source/tests/consistent/test_stat_file.py

njzjz and others added 2 commits June 19, 2026 15:57
Remove the TensorFlow-specific copy of stat-file helpers and call the dpmodel backend-agnostic implementation after packing TF batches into normalized samples.

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

@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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@deepmd/tf/model/ener.py`:
- Around line 236-250: The call to _save_observed_types_to_file at line 239
passes self.type_map which can be None, causing a TypeError in
collect_observed_types when it attempts to index the type_map parameter. Add a
guard condition to check that self.type_map is not None before calling
_save_observed_types_to_file, similar to the existing guard for
self.fitting.atom_ener. Only execute the _save_observed_types_to_file call when
type_map is available to prevent the indexing error in downstream code.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 75848502-2d2d-4977-81bd-6239a3c2e2c6

📥 Commits

Reviewing files that changed from the base of the PR and between d48eeaa and dba94b5.

📒 Files selected for processing (1)
  • deepmd/tf/model/ener.py

Comment thread deepmd/tf/model/ener.py Outdated
@njzjz njzjz requested review from iProzd and wanghan-iapcm June 19, 2026 22:25
Comment thread deepmd/tf/model/ener.py
Comment on lines +244 to +258
# Reuse the backend-agnostic dpmodel stat implementation instead of
# maintaining a TensorFlow copy of the same save/load/stat logic.
sampled = _pack_stat_batches(all_stat)
_save_observed_types_to_file(stat_file_path, sampled, self.type_map)
preset_bias = None
if len(self.fitting.atom_ener) > 0:
preset_bias = {"energy": self.fitting.atom_ener_v}
bias_out, _ = compute_output_stats(
sampled,
self.ntypes,
keys=["energy"],
stat_file_path=stat_file_path,
rcond=getattr(self.fitting, "rcond", None),
preset_bias=preset_bias,
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Routing through compute_output_stats here changes how the TF energy bias is computed, unconditionally (it runs even when stat_file_path is None). The historical TF path (EnerFitting._compute_output_stats, deepmd/tf/fit/ener.py) reduced one averaged energy per system and regressed nsys points; _pack_stat_batches concatenates every frame, so compute_output_stats regresses per frame — the same objective weighted by each system's frame count. The two coincide only when all systems have equal frame counts (and the mixed_type per-system vs per-frame real_natoms_vec averaging differs too). So bias_atom_e initialization now differs from old TF for datasets with unequal per-system frame counts.

This unification is actually required for the cross-backend stat file to be meaningful — a PT-written bias must match what TF computes — so I think switching to the dpmodel path is the right call (and it's only an initialization that training refines). But it is a silent change on the no-stat-file path for existing TF users. Suggest: (1) call it out in the PR description / changelog, and (2) add an unequal-frame (ideally also mixed_type) case to source/tests/consistent/test_stat_file.py — the current consistency test uses a single / equal-frame system, where per-frame and per-system regression are trivially identical, so it can't actually prove the TF/PT bias equality where it could diverge.

@njzjz-bot njzjz-bot Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, this is a good catch. Addressed in 6110c89, with a follow-up test-scope fix in 0419763 after CI exposed that std_atom_energy is backend-dependent auxiliary data:

  • Added an explicit PR-description note that TF energy-bias initialization now intentionally uses the shared dpmodel/PyTorch per-frame regression path even when training.stat_file is unset. This may differ from legacy TF's per-system weighting for unequal-frame systems, but it keeps freshly computed TF stats consistent with restored cross-backend stat files.
  • Added a code comment at the TF energy-model call site documenting the same intentional behavior.
  • Added test_stat_file_consistency_unequal_frame_systems, using water/data_0 + water/data_1, and now assert TF/PT equality for bias_atom_energy specifically. That is the stat-file value consumed for the restored energy bias; std_atom_energy can differ slightly between backends and is not used by the TF fitting initialization/reload path.

Local validation: python3 -m py_compile source/tests/consistent/test_stat_file.py, uvx ruff check source/tests/consistent/test_stat_file.py, uvx ruff format --check source/tests/consistent/test_stat_file.py, and git diff --check passed. The full unittest target is still not runnable in this unbuilt checkout because generated package metadata (deepmd._version / deepmd.__about__) is missing.

— OpenClaw 2026.6.8 (844f405), model: custom-chat-jinzhezeng-group/gpt-5.5

Comment on lines +142 to +148
stat_dict = _load_se_input_stats(stat_path, descrpt.get_ntypes(), angular)
if stat_dict is not None:
return stat_dict

stat_dict = compute()
_save_se_input_stats(stat_path, stat_dict, descrpt.get_ntypes(), angular)
return stat_dict

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This load branch (if stat_dict is not None: return stat_dict) is never exercised by a test. Every TF stat-file test only asserts that files were created; none reloads descriptor stats from an existing file and checks they are used (and bit-match a fresh compute). The fitting side does test its load path via the raise_error compute callback in test_fitting_stat.py — the descriptor side should have the equivalent. Also untested: the se_r (angular=False) and se_atten (mixed_types=True) save/load paths — only se_a is covered, so the angular=False round-trip and the mixed_types hash branch never run. A reload-and-compare test (per descriptor type) would close the gap.

@njzjz-bot njzjz-bot Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, addressed in 6110c89.

I added descriptor-stat reload coverage in TestDescriptorStatFile:

  • test_se_a_descriptor_stats_reload_from_file covers the angular save/load path.
  • test_se_r_descriptor_stats_reload_from_file covers the radial-only (angular=False) path.
  • test_se_atten_descriptor_stats_reload_from_mixed_type_hash covers the mixed-type hash branch used by se_atten.

Each test first saves stats, then calls load_or_compute_se_input_stats again with a compute callback that fails the test if invoked, so the load branch (if stat_dict is not None: return stat_dict) is now exercised directly.

Local validation: python3 -m py_compile on touched files, uvx ruff check, and uvx ruff format --check passed. I could not run the unittest target in this unbuilt checkout because generated package metadata (deepmd._version / deepmd.__about__) is missing.

— OpenClaw 2026.6.8 (844f405), model: custom-chat-jinzhezeng-group/gpt-5.5

Add unequal-frame TF/PT stat-file consistency coverage and descriptor stat-file reload tests for angular, radial-only, and mixed-type hash paths. Document the intentional shared per-frame bias initialization behavior in the TF energy model.\n\nAuthored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5)
Compare only shared output-stat files in the unequal-frame TF/PT regression test. Descriptor input stats are produced by backend-specific pipelines and can differ for multi-system data, so the regression should target the energy-bias stat files that the fix shares across backends.\n\nAuthored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5)
The unequal-frame consistency test is meant to cover the cross-backend energy-bias stat file. TF and PT can emit different auxiliary std_atom_energy values, so restrict the assertion to the bias consumed by stat-file reloads.

Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5)
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.

[Feature Request] Support stat_file in TF

3 participants