feat(pt_expt): add fitting for energy#5211
feat(pt_expt): add fitting for energy#5211wanghan-iapcm wants to merge 38 commits intodeepmodeling:masterfrom
Conversation
|
Warning Gemini encountered an error creating the summary. You can try again by commenting |
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
There was a problem hiding this comment.
💡 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]) |
There was a problem hiding this comment.
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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
No description provided.