Skip to content

feat(pt_expt): add fitting for energy#5211

Draft
wanghan-iapcm wants to merge 38 commits intodeepmodeling:masterfrom
wanghan-iapcm:feat-fitting
Draft

feat(pt_expt): add fitting for energy#5211
wanghan-iapcm wants to merge 38 commits intodeepmodeling:masterfrom
wanghan-iapcm:feat-fitting

Conversation

@wanghan-iapcm
Copy link
Collaborator

No description provided.

@wanghan-iapcm wanghan-iapcm requested a review from njzjz February 9, 2026 11:46
@gemini-code-assist
Copy link

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

@wanghan-iapcm wanghan-iapcm marked this pull request as draft February 9, 2026 11:46
@github-actions github-actions bot added the Python label Feb 9, 2026
@dosubot dosubot bot added the new feature label Feb 9, 2026
Copy link
Contributor

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9311ed567b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

obj = cls(**data)
# Reinitialize layers from serialized data, using the same layer type
# that __init__ created (respects subclass overrides via MRO).
layer_type = type(obj.layers[0])

Choose a reason for hiding this comment

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

P2 Badge Handle empty embedding stacks in deserialization

EmbeddingNet.deserialize() now unconditionally reads obj.layers[0] to infer the layer type, but EmbeddingNet.__init__ allows neuron=[], which produces an empty layers list. Deserializing a serialized embedding network with zero hidden layers will therefore raise IndexError before weights are restored, breaking model load/round-trip for valid configurations that rely on an identity embedding stack.

Useful? React with 👍 / 👎.

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 98.57651% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.07%. Comparing base (5c2ca51) to head (9311ed5).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
deepmd/pt_expt/common.py 92.85% 2 Missing ⚠️
deepmd/pt_expt/utils/type_embed.py 88.88% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5211      +/-   ##
==========================================
+ Coverage   81.99%   82.07%   +0.07%     
==========================================
  Files         724      732       +8     
  Lines       73807    73994     +187     
  Branches     3616     3616              
==========================================
+ Hits        60519    60729     +210     
+ Misses      12124    12103      -21     
+ Partials     1164     1162       -2     

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

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.

1 participant