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

Devel update #18

Merged
merged 55 commits into from
Aug 29, 2021
Merged

Devel update #18

merged 55 commits into from
Aug 29, 2021

Conversation

iProzd
Copy link
Owner

@iProzd iProzd commented Aug 29, 2021

No description provided.

njzjz and others added 30 commits August 10, 2021 08:49
* clean library and header dependencies

Fix #926.

* fix typo in rocm

* set INSTALL_RPATH for libraries
* add model compression support for models without training script

* fix line changes

* update doc for model compression

* make the error message more reasonable

* update doc for model compression
* convert `decay_rate` to `stop_lr` from old inputs

close #919.

* fix tests
* add LAMMPS plugin

- Breaking changes: update fix_dplr to support lammps/lammps#2560. Old version may be not supported. No idea how to support both versions.
- Feature: support LAMMPS's new plugin package. See document for details.
- update document and examples for LAMMPS plugin. The old installation method will be still supported, although it's removed from documents.
- LAMMPS hasn't released a stable version, but I think it will be released in one or two months.

* fix include path

* add compatibility

* add `make install` to lammps document

* update document for built-in mode

* revert troublesome

* update docs

* Update source/install/build_cc.sh
Although no one really enables and uses it, I still make it compatible with v2.0.
Also fix compilation errors.
Seems there is hard-code `DOUBLE` in the code, so I comment the float precision.
(cherry picked from commit ceb07e5)

Co-authored-by: tuoping <[email protected]>
Clang doesn't support this flag, cause an error on osx:

> ld: unknown option: --no-as-needed

This commit should be cherry-picked to `r1.2` branch.

(cherry picked from commit ee8c419)
In conda-forge's recent released tensorflow, protobuf is external
from tensorflow and not inside the tensorflow directory.

(cherry picked from commit f66c78e)
* rename for cherry-pick

* fix an error in stress by ase interface

(cherry picked from commit a24971f)

* move back

* fix lint error

* fix lint warnings

Co-authored-by: hsulab <[email protected]>
* add more badges

* fix the document badge link

* remove conda badge as it doesn't work
* add code comment for InputNlist struct

* use doxygen style for comments

* fix line changes
*Total -- 2,328.36kb -> 1,804.25kb (22.51%)

/doc/images/tensorboard-distribution.png -- 265.82kb -> 175.13kb (34.12%)
/doc/images/tensorboard-graph.png -- 366.55kb -> 257.79kb (29.67%)
/doc/images/l2_loss.png -- 136.16kb -> 97.31kb (28.53%)
/doc/images/tensorboard-scalar.png -- 345.15kb -> 250.00kb (27.57%)
/doc/images/l2_energy_loss.png -- 223.01kb -> 167.06kb (25.09%)
/doc/images/l2_force_loss.png -- 176.92kb -> 133.02kb (24.81%)
/doc/images/tensorboard-histograms.png -- 814.76kb -> 723.96kb (11.15%)

Signed-off-by: ImgBotApp <[email protected]>

Co-authored-by: ImgBotApp <[email protected]>
* refactor docs

* Update type-embedding.md

* fix typos

* Update lammps.md

* Update model-deviation.md

* fix typos

* fix links in readme; rewrite training

* refactor model part

* fix several typos; move sections

* Update doc/third-party/lammps-command.md

Co-authored-by: tuoping <[email protected]>

* create markdown files

* revert api_cc

* update developer toxtree

* remove unexpected api_cc.rst

Co-authored-by: Han Wang <[email protected]>
Co-authored-by: tuoping <[email protected]>
Although `nopbc` in a feature in v1.2, no one knows how to use it!
Also, some one doesn't know how to train elements with different atoms. (#486, #821)
The new example is less than 500 KB.
* generate Python API document automatically

* add `ase` to generate `deepmd.calculator`

* fix `ase` intersphinx_mapping
* unpin tensorflow version

As tensorflow API v1 has been stable, it's safe not to pin the tensorflow version.

* set `tf` to 2

* use 2.* instead

* correct `setup.py`
Also regenerates `train-input-auto.rst`.
* fix a bug in `setup.py`

I got what's wrong here...

* remove `Distribution`
* fix incorrect type hints and docstrings

* fix a typo
* add model compression training support

* fix UT error

* address comments

* address comments

* rm fitting_net_variables from class DPTabulate

* clean class DPTabulate

* fix typo

* add doc for init-frz-model

add doc for init-frz-model at training-advanced.md

* fix rocm error
njzjz and others added 25 commits August 22, 2021 10:12
* add examples to `DeepPot`'s docstring

* add an example to `calc_model_devi`'s docstring
This can fixes some wired styles.
)

Otherwise it won't be shown in the document.

Also contains other cleanups.
* Instantiate RunOptions first when training.

* Add an end-to-end test for parallel training.

* Allow CPU parallel training.
* add docstring to `DescrptSeA`

Contains other cleanups.

* fix the equation of `s(r)`
* add `InputNlist` into API doc

This struct is necessary for C++ APIs.

* Apply suggestions from code review

Co-authored-by: Denghui Lu <[email protected]>

* update comment for `firstneigh`

Co-authored-by: Denghui Lu <[email protected]>
* add docstring for `EnerFitting`

* Apply suggestions from code review

Co-authored-by: Han Wang <[email protected]>

Co-authored-by: Han Wang <[email protected]>
* Use a local Numpy random generator.

* Fix import error.

* Replace random generator in test_gen_stat_data.py.
This commit saves checkpoint to `save_ckpt-step` (e.g. `model.ckpt-100`) instead of `save_ckpt` (e.g. `model.ckpt`), and keeps 5 recent checkpoint files (this is a default value of `tf.Saver`). Such thing is conducted by `tf.Saver`.  To not break any behaviors, a symlink will then be made from  `model.ckpt-100` to `model.ckpt`. (Usually such thing should be controlled by `checkpoint` file, but deepmd-kit doesn't read this file.)
This can fix #1023, as (1) we made symlink after a checkpoint has been already saved; (2) if something is still wrong, one can use a previous checkpoint instead.
* speedup cuda kernel scan_nlist

* fix no-pbc error
* use TF's built-in method to get numpy dtype

I got a way to get the numpy type from a int. Take an example
```py
>>> tf.dtypes.as_dtype(19).as_numpy_dtype
<class 'numpy.float16'>
```

`PRECISION_MAPPING` is not used any more, as it's actually not a public API.

By the way, it also supports `str`
```py
>>> tf.dtypes.as_dtype("float16")
tf.float16
```

* sadly only `tf.as_dtype` is supported in TF 1.8
…in SE_A, now tanh & gelu is both available. (#1020)

* commit-message: decouple activation function's type from model compression's process in SE_A, now tanh & gelu is both available.

* commit-message: modified code and passed unittest

* commit-message: Format Document

* commit-message :Format revert

* commit-message: format change

* commit-message: Format change

Co-authored-by: HLA <[email protected]>
* fix model compression error

* add doc for model compression limitation
@iProzd iProzd merged commit 978b37c into iProzd:devel Aug 29, 2021
iProzd pushed a commit that referenced this pull request Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants