Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tf): fix DeepEval degradation for virtual types #3464

Merged

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Mar 14, 2024

The energy fitting network computes nloc by summing over natoms[2:] instead of reading natoms[0].

self.atom_bias_ener = tf.reshape(
tf.nn.embedding_lookup(self.t_bias_atom_e, self.atype_nloc),
[tf.shape(inputs)[0], tf.reduce_sum(natoms[2 : 2 + ntypes_atom])],
)

This causes an issue for the virtual types after refactoring DeepEval. Before, natoms_vec is [nloc, nall, nloc, ...] for mixed types. After refactoring, we use the same natoms_vec for mixed_types and the normal case, so the virtual type support is broken.

This was not detected by the test, as the test model for the virtual types was added 12 months ago, but the energy fitting was changed 10 months ago.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.35%. Comparing base (487f85c) to head (8dab33b).

Additional details and impacted files
@@           Coverage Diff           @@
##            devel    #3464   +/-   ##
=======================================
  Coverage   77.35%   77.35%           
=======================================
  Files         428      428           
  Lines       37000    37004    +4     
  Branches     1620     1620           
=======================================
+ Hits        28622    28626    +4     
  Misses       7510     7510           
  Partials      868      868           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@njzjz njzjz requested a review from wanghan-iapcm March 14, 2024 23:27
@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue Mar 15, 2024
Merged via the queue into deepmodeling:devel with commit d61b152 Mar 15, 2024
48 checks passed
@njzjz njzjz mentioned this pull request Apr 2, 2024
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