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

Merge devel into master #3165

Merged
merged 98 commits into from
Jan 23, 2024
Merged

Merge devel into master #3165

merged 98 commits into from
Jan 23, 2024

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Jan 23, 2024

Prepare v2.2.8

njzjz and others added 30 commits October 27, 2023 15:44
`gelu_tf` is equivalent to `gelu`.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
By default, SpecifierSet doesn't allow prereleases, which is not our
expected behavior.

Signed-off-by: Jinzhe Zeng <[email protected]>
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.1 →
v0.1.3](astral-sh/ruff-pre-commit@v0.1.1...v0.1.3)
- [github.com/psf/black-pre-commit-mirror: 23.10.0 →
23.10.1](psf/black-pre-commit-mirror@23.10.0...23.10.1)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
to be consistent with Pytorch version

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
See https://astral.sh/blog/the-ruff-formatter

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Add theory to documentation.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Han Wang <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Han Wang <[email protected]>
…#2975)

See
https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes.

We shall add proper labels when submitting and merging PRs, so release
notes can be more automatic.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.3 →
v0.1.4](astral-sh/ruff-pre-commit@v0.1.3...v0.1.4)
- [github.com/pre-commit/mirrors-clang-format: v17.0.3 →
v17.0.4](pre-commit/mirrors-clang-format@v17.0.3...v17.0.4)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Although we set it to `all` by default, one may manually set it via
[CMAKE_CUDA_ARCHITECTURES](https://cmake.org/cmake/help/latest/variable/CMAKE_CUDA_ARCHITECTURES.html)
or
[CUDAARCHS](https://cmake.org/cmake/help/latest/envvar/CUDAARCHS.html#envvar:CUDAARCHS).

Signed-off-by: Jinzhe Zeng <[email protected]>
The current implementation used a complex method to ensure `ixnode`
(int) within `[0, nxnodes-1]`, but why not use mod ("%") to get the same
behavior?

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Bump scikit-build-core from `>=0.5,<0.6` to `>=0.5,<0.7,!=0.6.0`. (by
default it will install 0.6.1)

Signed-off-by: Jinzhe Zeng <[email protected]>
Preparation for more methods in the `deepmd_utils` package.
(`deepmd_cli` is not a good name for this usage)

Enable documentation for the `deepmd_utils` package.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
It has been covered by `quick_start.ipynb` or `lammps-command.md`.
TensorFlow 2.15 bumps the CUDA version to 12.2. See
tensorflow/tensorflow@3de4416.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 →
v0.1.5](astral-sh/ruff-pre-commit@v0.1.4...v0.1.5)
- [github.com/scop/pre-commit-shfmt: v3.7.0-1 →
v3.7.0-2](scop/pre-commit-shfmt@v3.7.0-1...v3.7.0-2)
<!--pre-commit.ci end-->

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jinzhe Zeng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Bumps
[docker/build-push-action](https://github.com/docker/build-push-action)
from 5.0.0 to 5.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/build-push-action/releases">docker/build-push-action's
releases</a>.</em></p>
<blockquote>
<h2>v5.1.0</h2>
<ul>
<li>Add <code>annotations</code> input by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/992">docker/build-push-action#992</a></li>
<li>Add <code>secret-envs</code> input by <a
href="https://github.com/elias-lundgren"><code>@​elias-lundgren</code></a>
in <a
href="https://redirect.github.com/docker/build-push-action/pull/980">docker/build-push-action#980</a></li>
<li>Bump <code>@​babel/traverse</code> from 7.17.3 to 7.23.2 in <a
href="https://redirect.github.com/docker/build-push-action/pull/991">docker/build-push-action#991</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.13.0-rc.1 to
0.14.0 in <a
href="https://redirect.github.com/docker/build-push-action/pull/990">docker/build-push-action#990</a>
<a
href="https://redirect.github.com/docker/build-push-action/pull/1006">docker/build-push-action#1006</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0">https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/docker/build-push-action/commit/4a13e500e55cf31b7a5d59a38ab2040ab0f42f56"><code>4a13e50</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1006">#1006</a>
from docker/dependabot/npm_and_yarn/docker/actions-t...</li>
<li><a
href="https://github.com/docker/build-push-action/commit/74166686865cdc289a02f214871fb53447b73447"><code>7416668</code></a>
chore: update generated content</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b4f76a5dc6a67282180eddc6d460f23bc97bfcbc"><code>b4f76a5</code></a>
chore(deps): Bump <code>@​docker/actions-toolkit</code> from 0.13.0 to
0.14.0</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b7feb766fae338d85274c87a9d0f24c09690dbe2"><code>b7feb76</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1005">#1005</a>
from crazy-max/ci-inspect</li>
<li><a
href="https://github.com/docker/build-push-action/commit/fae8018297c67066fff64a6e9c319c86f89b8982"><code>fae8018</code></a>
ci: inspect sbom and provenance</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b625868b13c3feb675cabbf9bfeb52ae94166606"><code>b625868</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1004">#1004</a>
from crazy-max/ci-update-buildx</li>
<li><a
href="https://github.com/docker/build-push-action/commit/5193ef1da6ea0d66de97d22817c258b203ade96a"><code>5193ef1</code></a>
ci: update buildx to latest</li>
<li><a
href="https://github.com/docker/build-push-action/commit/d3afd779e409ac26db5374fb27fe4aae9f6adb42"><code>d3afd77</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/991">#991</a>
from docker/dependabot/npm_and_yarn/babel/traverse-7....</li>
<li><a
href="https://github.com/docker/build-push-action/commit/7a786bb2b9408f7f997564f677248fabd4b886d5"><code>7a786bb</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/992">#992</a>
from crazy-max/annotations</li>
<li><a
href="https://github.com/docker/build-push-action/commit/c66ae3adcfbf698ecd851c6bb782654a0c6ffcae"><code>c66ae3a</code></a>
chore: update generated content</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/build-push-action/compare/0565240e2d4ab88bba5387d719585280857ece09...4a13e500e55cf31b7a5d59a38ab2040ab0f42f56">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=5.0.0&new-version=5.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Recently I contributed Horovod to conda-forge at
conda-forge/staged-recipes#24472. I have tested
it with DeePMD-kit. Now the Conda-forge channel has all the features in
our deepmodeling channel and even more available platforms.

I wonder if we should recommend Conda-forge in favor of our DeepModeling
channel and use it for the offline installer. In 2019, Conda-forge
lacked support for TensorFlow, so we hosted and built our own channel
against the Anaconda channel. But now Conda-forge has become a mature
channel and has better support for TensorFlow than the Anaconda channel.

Signed-off-by: Jinzhe Zeng <[email protected]>
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.5 →
v0.1.6](astral-sh/ruff-pre-commit@v0.1.5...v0.1.6)
- [github.com/pre-commit/mirrors-clang-format: v17.0.4 →
v17.0.5](pre-commit/mirrors-clang-format@v17.0.4...v17.0.5)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
When the probability of a system is smaller than 1e-3, it is shown as
`0.000`, which is useless. This commit changes it to the scientific
notation, displaying it like `1.547e-06`.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: Han Wang <[email protected]>
<!--pre-commit.ci start-->
updates:
- [github.com/scop/pre-commit-shfmt: v3.7.0-3 →
v3.7.0-4](scop/pre-commit-shfmt@v3.7.0-3...v3.7.0-4)
<!--pre-commit.ci end-->

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jinzhe Zeng <[email protected]>
Modified the `DPMD_CVT_STR` macro to handle multiple arguments by using
`__VA_ARGS__`. This resolves deepmodeling#2952, the error caused by commas in the
branch name during compilation.

This commit (including the above message) is entirely generated by
ChatGPT 3.5.

Signed-off-by: Jinzhe Zeng <[email protected]>
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v17.0.5 →
v17.0.6](pre-commit/mirrors-clang-format@v17.0.5...v17.0.6)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
No breaking changes there

Signed-off-by: Jinzhe Zeng <[email protected]>
…ling#3036)

Resolves deepmodeling#3027.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
pre-commit-ci bot and others added 12 commits January 17, 2024 11:26
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.11 →
v0.1.13](astral-sh/ruff-pre-commit@v0.1.11...v0.1.13)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…g#3148)

See deepmodeling#3119

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- strict type hint
- allow the last dim to be variable (by setting the dim to -1)
- remove variable def, which is not very useful. 
- _derv_c should be defined for each atom

---------

Co-authored-by: Han Wang <[email protected]>
Co-authored-by: Jinzhe Zeng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…ng#3145)

Remove 18 member functions from `DeepPotBase` and 4 member functions
from `DeepTensor`.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
AmberTools24 should be released in April 2024.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
…#3153)

To prevent circular import

Signed-off-by: Jinzhe Zeng <[email protected]>
Fix
deepmodeling#2523 (comment).


[`CMAKE_<LANG>_FLAGS`](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html#variable:CMAKE_%3CLANG%3E_FLAGS)
is a string, so when using `set`, we should use quotes.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This saves the time to load TensorFlow.

Signed-off-by: Jinzhe Zeng <[email protected]>
Copy link

@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

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 341 lines in your changes are missing coverage. Please review.

Comparison is base (839f4fe) 75.22% compared to head (138ffef) 76.06%.

Files Patch % Lines
deepmd_utils/loggers/loggers.py 51.88% 51 Missing ⚠️
deepmd_utils/utils/data_system.py 87.50% 36 Missing ⚠️
source/api_cc/src/DataModifierTF.cc 78.06% 23 Missing and 11 partials ⚠️
deepmd_utils/utils/compat.py 84.31% 24 Missing ⚠️
deepmd_utils/utils/argcheck.py 96.11% 22 Missing ⚠️
deepmd_utils/model_format/network.py 91.93% 20 Missing ⚠️
deepmd_utils/utils/data.py 93.81% 19 Missing ⚠️
deepmd_utils/common.py 82.81% 11 Missing ⚠️
deepmd_utils/model_format/se_e2_a.py 87.64% 11 Missing ⚠️
deepmd_utils/utils/path.py 91.45% 10 Missing ⚠️
... and 32 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3165      +/-   ##
==========================================
+ Coverage   75.22%   76.06%   +0.84%     
==========================================
  Files         245      277      +32     
  Lines       24678    25603     +925     
  Branches     1599     1591       -8     
==========================================
+ Hits        18565    19476     +911     
- Misses       5177     5203      +26     
+ Partials      936      924      -12     

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

@njzjz njzjz enabled auto-merge January 23, 2024 03:25
@njzjz njzjz merged commit b875ea8 into deepmodeling:master Jan 23, 2024
88 of 89 checks passed
@njzjz njzjz changed the title Merge devel to master Merge devel into master Jan 23, 2024
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.

8 participants