Skip to content

merge devel into master#1942

Merged
amcadmus merged 22 commits into
deepmodeling:masterfrom
amcadmus:master
Sep 23, 2022
Merged

merge devel into master#1942
amcadmus merged 22 commits into
deepmodeling:masterfrom
amcadmus:master

Conversation

@amcadmus

Copy link
Copy Markdown
Member

No description provided.

amcadmus and others added 21 commits August 19, 2022 12:41
deepmodeling#921 discussed that the tensors are compressed in the graph file. But it looks no... So at least we remove white space.
FastGFile throws a deprecated warning.
See https://github.com/tensorflow/tensorflow/blob/d8ce9f9c301d021a69953134185ab728c1c248d3/tensorflow/python/platform/gfile.py#L128

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

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Here I upload the implementation of attention based model (DPA-1), see details in paper: https://arxiv.org/abs/2208.08236.
The changes can mainly be listed as following:

1. Add a new descriptor '**se_atten**', using attention schemes and type embeddings (deepmd/descriptor/se_atten.py);

2. Add a new custom op '**ProdEnvMatAMix**', mixing atoms with different types in the sorting, which is only suitable for descriptor using type embeddings (source/op/prod_env_mat_multi_device.cc and other sub files, here I try the best to reuse the previous codes);  

3. Other changes to match the newly added descriptor, such as 'sel' supporting 'int' type as input (deepmd/entrypoints/train.py ) and type embedding with padding (deepmd/utils/type_embed.py);

4. **Mixed_type**: a new format of DeepmdData  to put different systems sharing the same 'nloc' (instead of same fingerprints) together. (deepmd/utils/data.py & data_system.py) Note that this is only the training code on this new format of data. The generation code of this new format will soon be uploaded in _dpdata_.

5. An example of DPA-1 on water system (examples/water/se_atten/input.json);

6. The unittests on both C++&CUDA&ROCM and python interface of newly added apis(source/lib/tests & source/tests).

Unittests passed individually for these newly added features. Thanks for reviewing and disccusions are welcome.
Make warnings shown on the web page more prominent.
…#1885)

Note: commonly there is no suffix for a fitting.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
> deepmd/env.py:8: DeprecationWarning: the imp module is deprecated in
favour of importlib and slated for removal in Python 3.12; see the
module's documentation for alternative uses

See also https://docs.python.org/3/library/imp.html#imp.reload

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
It is not used anymore.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Also, (1) replace `GREATER_EQUAL` by `VERSION_GREATER_EQUAL`.
`GREATER_EQUAL` does not work with `2.10`; (2) upgrade manylinux to 2_28
to have a newer compiler that supports C++ 17.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Fix bugs when init_frz_model using tebd.
Add init_variables for attention variables.
Fix precision of self.t_bias_atom_e in se_atten.py.
Change the default values in argcheck for se_atten (typos).
Improve the name scope in se_atten.py.
Delete some redundant variables in se_atten.py.
Move tf.constant from se_a.__init__() into build.
Add UTs for init_frz_model.

Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
This should avoid the conflicts related to the custom `Gelu` and
Tensorflow's `Gelu`. Also Fix deepmodeling#1913.
enforce type_map change when mixed_type.
add out_of_bound check for 'real_atom_types.npy'.
Fix deepmodeling#1934.

Add `descrpt_attr/rcut`, `descrpt_attr/ntypes`, `fitting_attr/dfparam`,
`model_type`, `o_energy`, `o_force`, `o_virial`, `o_atom_energy`,
`o_atom_virial`.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@github-actions github-actions Bot added the ROCM label Sep 23, 2022
@codecov-commenter

codecov-commenter commented Sep 23, 2022

Copy link
Copy Markdown

Codecov Report

Base: 76.98% // Head: 78.16% // Increases project coverage by +1.18% 🎉

Coverage data is based on head (ffb2fd8) compared to base (c393392).
Patch coverage: 90.44% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1942      +/-   ##
==========================================
+ Coverage   76.98%   78.16%   +1.18%     
==========================================
  Files         117      118       +1     
  Lines        9417     9876     +459     
==========================================
+ Hits         7250     7720     +470     
+ Misses       2167     2156      -11     
Impacted Files Coverage Δ
deepmd/fit/dipole.py 93.05% <0.00%> (ø)
deepmd/fit/polar.py 49.01% <0.00%> (ø)
deepmd/nvnmd/entrypoints/wrap.py 96.24% <ø> (ø)
source/lib/include/neighbor_list.h 100.00% <ø> (ø)
deepmd/utils/convert.py 14.65% <10.00%> (-0.26%) ⬇️
source/op/_gelu.py 68.42% <50.00%> (-0.81%) ⬇️
deepmd/fit/ener.py 87.36% <73.52%> (-2.56%) ⬇️
deepmd/train/trainer.py 80.65% <83.33%> (+1.52%) ⬆️
deepmd/utils/graph.py 85.71% <85.71%> (+15.23%) ⬆️
deepmd/utils/data.py 91.36% <89.65%> (+0.05%) ⬆️
... and 24 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

fix bugs in type_idx_map using np.searchsorted
@amcadmus amcadmus merged commit 6e3d4a6 into deepmodeling:master Sep 23, 2022
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.

5 participants