Skip to content

Conversation

@iProzd
Copy link
Collaborator

@iProzd iProzd commented Dec 15, 2025

Summary by CodeRabbit

  • Chores
    • Updated example configuration files to include configurable seed parameters across all model variants (DPA2, DPA3, SE-Atten, SE-E3-TEBD, multi-task learning), enhancing reproducibility and configuration flexibility.

✏️ Tip: You can customize this high-level summary in your review settings.

@iProzd iProzd requested a review from njzjz December 15, 2025 09:44
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 15, 2025

📝 Walkthrough

Walkthrough

Multiple example configuration JSON files in the water and water_multi_task directories receive a new "seed" field with value 1 added to various descriptor and configuration objects, enabling seed control across DPA2, DPA3, SE_ATTEN, and SE_E3_TEBD model configurations.

Changes

Cohort / File(s) Change Summary
Water DPA2 examples
examples/water/dpa2/input_torch_compressible.json, examples/water/dpa2/input_torch_large.json, examples/water/dpa2/input_torch_medium.json, examples/water/dpa2/input_torch_small.json
Added "seed": 1 field to model.descriptor.repinit configuration object
Water DPA3 examples
examples/water/dpa3/input_torch.json, examples/water/dpa3/input_torch_dynamic.json
Added "seed": 1 field to activation/config section
Water SE variants
examples/water/se_atten/input_torch.json, examples/water/se_e3_tebd/input_torch.json
Added "seed": 1 field to model.descriptor configuration object
Water multi-task examples
examples/water_multi_task/pytorch_example/input_torch.json, examples/water_multi_task/pytorch_example/input_torch_sharefit.json, examples/water_multi_task/pytorch_example/input_torch_with_alias.json
Added "seed": 1 field to respective descriptor objects (dpa2_descriptor or dpa3_descriptor)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • All changes are homogeneous configuration additions (same field added across multiple files)
  • No code logic, control flow, or functional changes
  • Simple verification that "seed": 1 was correctly appended to appropriate descriptor/configuration objects

Possibly related PRs

  • PR #4419: Modifies the same example file examples/water_multi_task/pytorch_example/input_torch.json and dpa2_descriptor configuration
  • PR #4655: Updates example configurations including examples/water/dpa3/input_torch.json for DPA3 model descriptor
  • PR #4778: Previously added input_torch_dynamic.json to examples/water/dpa3 and modified input_torch.json in the same directory

Suggested labels

Examples

Suggested reviewers

  • njzjz
  • wanghan-iapcm

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding seed parameters to descriptor configurations across multiple example JSON files.
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
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b9c82d7 and 8743476.

📒 Files selected for processing (11)
  • examples/water/dpa2/input_torch_compressible.json (1 hunks)
  • examples/water/dpa2/input_torch_large.json (1 hunks)
  • examples/water/dpa2/input_torch_medium.json (1 hunks)
  • examples/water/dpa2/input_torch_small.json (1 hunks)
  • examples/water/dpa3/input_torch.json (1 hunks)
  • examples/water/dpa3/input_torch_dynamic.json (1 hunks)
  • examples/water/se_atten/input_torch.json (1 hunks)
  • examples/water/se_e3_tebd/input_torch.json (1 hunks)
  • examples/water_multi_task/pytorch_example/input_torch.json (1 hunks)
  • examples/water_multi_task/pytorch_example/input_torch_sharefit.json (1 hunks)
  • examples/water_multi_task/pytorch_example/input_torch_with_alias.json (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: 1azyking
Repo: deepmodeling/deepmd-kit PR: 4169
File: examples/hessian/single-task/input.json:3-59
Timestamp: 2024-10-05T02:57:02.517Z
Learning: In the deepmd-kit project, having different `rcut` values for `repinit` and `repformer` is acceptable when they align with existing configurations, such as in `examples/water/dpa2/input_torch.json`.
Learnt from: 1azyking
Repo: deepmodeling/deepmd-kit PR: 4169
File: examples/hessian/single-task/input.json:3-59
Timestamp: 2024-10-08T15:32:11.479Z
Learning: In the deepmd-kit project, having different `rcut` values for `repinit` and `repformer` is acceptable when they align with existing configurations, such as in `examples/water/dpa2/input_torch.json`.
📚 Learning: 2024-10-08T15:32:11.479Z
Learnt from: 1azyking
Repo: deepmodeling/deepmd-kit PR: 4169
File: examples/hessian/single-task/input.json:3-59
Timestamp: 2024-10-08T15:32:11.479Z
Learning: In the deepmd-kit project, having different `rcut` values for `repinit` and `repformer` is acceptable when they align with existing configurations, such as in `examples/water/dpa2/input_torch.json`.

Applied to files:

  • examples/water_multi_task/pytorch_example/input_torch_sharefit.json
  • examples/water/dpa2/input_torch_medium.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (28)
  • GitHub Check: Build C++ (cuda120, cuda)
  • GitHub Check: Build C library (2.18, libdeepmd_c.tar.gz)
  • GitHub Check: Build C++ (cpu, cpu)
  • GitHub Check: Build C++ (clang, clang)
  • GitHub Check: Build C++ (rocm, rocm)
  • GitHub Check: Test Python (1, 3.10)
  • GitHub Check: Test Python (6, 3.13)
  • GitHub Check: Test Python (2, 3.13)
  • GitHub Check: Test Python (4, 3.13)
  • GitHub Check: Test Python (4, 3.10)
  • GitHub Check: Test Python (3, 3.13)
  • GitHub Check: Test Python (5, 3.13)
  • GitHub Check: Test Python (2, 3.10)
  • GitHub Check: Test Python (3, 3.10)
  • GitHub Check: Test Python (6, 3.10)
  • GitHub Check: Test Python (5, 3.10)
  • GitHub Check: Test Python (1, 3.13)
  • GitHub Check: Build wheels for cp310-manylinux_aarch64
  • GitHub Check: Build wheels for cp311-manylinux_x86_64
  • GitHub Check: Build wheels for cp311-win_amd64
  • GitHub Check: Build wheels for cp311-macosx_arm64
  • GitHub Check: Build wheels for cp311-macosx_x86_64
  • GitHub Check: Test C++ (true, true, true, false)
  • GitHub Check: Test C++ (false, false, false, true)
  • GitHub Check: Test C++ (false, true, true, false)
  • GitHub Check: Test C++ (true, false, false, true)
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (c-cpp)
🔇 Additional comments (11)
examples/water/dpa3/input_torch.json (1)

37-38: Add seed parameter for DPA3 descriptor reproducibility.

The seed field is correctly added to the descriptor configuration block, following the concat_output_tebd setting. Trailing comma adjustment is properly handled.

Please verify that the seed parameter is a supported configuration option for the dpa3 descriptor type in the deepmd-kit framework.

examples/water_multi_task/pytorch_example/input_torch.json (1)

57-57: Add seed parameter to shared DPA2 descriptor.

The seed field is correctly positioned in the dpa2_descriptor configuration block within the shared_dict, maintaining consistency with the multi-task configuration structure.

Verify that the seed parameter is supported for dpa2 descriptors in multi-task configurations.

examples/water/se_e3_tebd/input_torch.json (1)

20-21: Add seed parameter for SE_E3_TEBD descriptor reproducibility.

The seed field is correctly added to the descriptor configuration at the appropriate level. Trailing comma adjustment is properly handled.

Verify that the seed parameter is supported for the se_e3_tebd descriptor type.

examples/water/se_atten/input_torch.json (1)

28-29: Add seed parameter for SE_ATTEN descriptor reproducibility.

The seed field is correctly added to the descriptor configuration block. Trailing comma adjustment on the previous line is properly handled.

Verify that the seed parameter is supported for the dpa1 (SE_ATTEN) descriptor type.

examples/water/dpa2/input_torch_medium.json (1)

55-56: Add seed parameter to DPA2 descriptor configuration.

The seed field is correctly positioned after the add_tebd_to_repinit_out setting, maintaining consistency with other DPA2 example configurations.

Confirm that the seed parameter is supported for dpa2 descriptor configurations.

examples/water_multi_task/pytorch_example/input_torch_sharefit.json (1)

57-57: Add seed parameter to shared DPA2 descriptor in sharefit configuration.

The seed field is correctly positioned in the dpa2_descriptor, maintaining parity with other multi-task examples using shared descriptor configurations.

examples/water/dpa2/input_torch_compressible.json (1)

56-57: Add seed parameter to DPA2 compressible descriptor configuration.

The seed field is correctly added at the descriptor level, maintaining consistency with other DPA2 example variants.

examples/water/dpa3/input_torch_dynamic.json (1)

39-40: Add seed parameter to DPA3 dynamic descriptor configuration.

The seed field is correctly positioned at the descriptor level, maintaining parity with the standard DPA3 example configuration.

examples/water/dpa2/input_torch_large.json (1)

55-56: Configuration changes look good.

The seed field is properly added to the descriptor with correct JSON syntax and placement. The value aligns with other descriptor-level seeds in the repository.

examples/water/dpa2/input_torch_small.json (1)

55-56: Consistent with the large variant.

The seed field placement and value match the input_torch_large.json file, maintaining consistency across DPA2 example variants.

examples/water_multi_task/pytorch_example/input_torch_with_alias.json (1)

40-41: Appropriate seed placement for shared descriptor.

The seed field is correctly positioned inside the shared DPA3 descriptor configuration, maintaining consistency with the multi-task architecture pattern used in this example.


Summary

All three files show straightforward and correct configuration changes. The seed values are consistently set to 1 across descriptor configurations, with appropriate placement adapted to each file's structure (single-task vs. multi-task). JSON formatting and syntax are valid throughout.


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.

@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.14%. Comparing base (b9c82d7) to head (8743476).
⚠️ Report is 1 commits behind head on devel.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #5098      +/-   ##
==========================================
- Coverage   82.14%   82.14%   -0.01%     
==========================================
  Files         709      709              
  Lines       72453    72454       +1     
  Branches     3616     3615       -1     
==========================================
  Hits        59515    59515              
- Misses      11775    11776       +1     
  Partials     1163     1163              

☔ View full report in Codecov by Sentry.
📢 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 added this pull request to the merge queue Dec 15, 2025
Merged via the queue into deepmodeling:devel with commit f7f7f18 Dec 15, 2025
58 checks passed
ChiahsinChu pushed a commit to ChiahsinChu/deepmd-kit that referenced this pull request Dec 17, 2025
…odeling#5098)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Updated example configuration files to include configurable seed
parameters across all model variants (DPA2, DPA3, SE-Atten, SE-E3-TEBD,
multi-task learning), enhancing reproducibility and configuration
flexibility.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants