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

v2.2.11 #3940

Merged
merged 30 commits into from
Jul 3, 2024
Merged

v2.2.11 #3940

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
644cc52
tf: remove freeze warning for optional nodes (#3381)
njzjz Mar 2, 2024
dbf5d4a
fix: set rpath for libtorch and protobuf (#3636)
njzjz Apr 2, 2024
478fbf3
feat: apply descriptor exclude_types to env mat stat (#3625)
njzjz Apr 7, 2024
b563e35
fix(tf): apply exclude types to se_atten_v2 switch (#3651)
njzjz Apr 8, 2024
1f2f6fd
fix: fix git version detection in docker_package_c.sh (#3658)
njzjz Apr 9, 2024
2c84b22
feat(build): Add Git archives version files (#3669)
njzjz-bot Apr 13, 2024
a6acc34
fix(tf): fix foat32 for exclude_types in se_atten_v2 (#3682)
njzjz Apr 18, 2024
cdbb70d
Fix typo in `smooth_type_embdding` (#3698)
iProzd Apr 22, 2024
b3b6a4e
build(deps): bump tar from 6.1.14 to 6.2.1 in /source/nodejs (#3714)
njzjz Apr 27, 2024
3407e82
build: unpin tensorflow version on windows (#3721)
njzjz Apr 30, 2024
5510794
test: set more lossy precision requirements (#3726)
nahso Apr 30, 2024
776a0be
Clarifiy se_atten_v2 compression doc (#3727)
nahso May 5, 2024
96139dc
style: enable W rules (#3793)
njzjz May 18, 2024
afb059c
lmp: improve error message when compute/fix is not found (#3801)
njzjz May 23, 2024
f24c025
Add a reminder for the illegal memory error (#3822)
Yi-FanLi May 27, 2024
b53fd5a
fix: fix ipi package (#3835)
njzjz May 29, 2024
df4d2f0
docs: add document equations for `se_atten_v2` (#3828)
Chengqian-Zhang Jul 2, 2024
c39dfe6
fix(tf): prevent `fitting_attr` variable scope from becoming `fitting…
njzjz Jul 2, 2024
9feecdc
build(deps): bump pypa/cibuildwheel from 2.17 to 2.18 (#3777)
dependabot[bot] May 13, 2024
95a7dd8
build(deps): bump docker/build-push-action from 5 to 6 (#3882)
dependabot[bot] Jun 18, 2024
02f90a4
sync .pre-commit-config.yaml with devel
njzjz Jul 2, 2024
85dff3b
docs: update DPA-1 reference (#3810)
njzjz May 23, 2024
709abf2
docs: setup uv for readthedocs (#3685)
njzjz Apr 19, 2024
630753c
CI: Accerate GitHub Actions using uv (#3676)
njzjz Apr 16, 2024
a71e099
ci: bump ase to 3.23.0 (#3846)
njzjz Jun 3, 2024
128654c
ci(build): use uv for cibuildwheel (#3695)
njzjz Jun 11, 2024
bf36e26
chore(ci): workaround to retry `error decoding response body` from uv…
njzjz Jun 21, 2024
1a36681
[r2] Fix uv installation with Python 3.7
njzjz Jul 2, 2024
e7f23e6
[r2] fix ase version with Python 3.7
njzjz Jul 2, 2024
2b3519a
[r2] fix `test_smoothness_of_stripped_type_embedding_smooth_model_exc…
njzjz Jul 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# do not show up detailed difference on GitHub
source/3rdparty/* linguist-generated=true
source/3rdparty/README.md linguist-generated=false
.git_archival.txt export-subst
4 changes: 2 additions & 2 deletions .github/workflows/build_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- uses: lukka/get-cmake@latest
- run: python -m pip install tensorflow
- run: python -m pip install uv
- run: source/install/uv_with_retry.sh pip install --system tensorflow
- run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
&& sudo dpkg -i cuda-keyring_1.0-1_all.deb \
Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,30 +65,27 @@ jobs:
with:
# https://github.com/pypa/setuptools_scm/issues/480
fetch-depth: 0
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
if: runner.os != 'Linux'
- uses: docker/setup-qemu-action@v3
name: Setup QEMU
if: matrix.platform_id == 'manylinux_aarch64' && matrix.os == 'ubuntu-latest'
# detect version in advance. See #3168
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.11'
cache: 'pip'
if: matrix.dp_pkg_name == 'deepmd-kit-cu11'
- run: |
python -m pip install setuptools_scm
python -c "from setuptools_scm import get_version;print('SETUPTOOLS_SCM_PRETEND_VERSION='+get_version())" >> $GITHUB_ENV
echo "SETUPTOOLS_SCM_PRETEND_VERSION=$(pipx run uv tool run --from setuptools_scm python -m setuptools_scm)" >> $GITHUB_ENV
rm -rf .git
if: matrix.dp_pkg_name == 'deepmd-kit-cu11'
- name: Build wheels
uses: pypa/cibuildwheel@v2.17
uses: pypa/cibuildwheel@v2.19
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: all
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
DP_VARIANT: ${{ matrix.dp_variant }}
CUDA_VERSION: ${{ matrix.cuda_version }}
DP_PKG_NAME: ${{ matrix.dp_pkg_name }}
CIBW_BUILD_FRONTEND: 'build[uv]'
- uses: actions/upload-artifact@v4
with:
name: cibw-cp${{ matrix.python }}-${{ matrix.platform_id }}-cu${{ matrix.cuda_version }}-${{ strategy.job-index }}
Expand All @@ -100,14 +97,8 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.11'
cache: 'pip'
- run: python -m pip install build
- name: Build sdist
run: python -m build --sdist
run: pipx run uv tool run --with build[uv] --from build python -m build --installer uv --sdist

- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -161,7 +152,7 @@ jobs:
images: ghcr.io/deepmodeling/deepmd-kit

- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: source/install/docker
push: ${{ github.repository_owner == 'deepmodeling' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/package_c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
filename: libdeepmd_c_cu11.tar.gz
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Package C library
run: ./source/install/docker_package_c.sh
env:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/test_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
with:
mpi: mpich
- uses: lukka/get-cmake@latest
- run: python -m pip install tensorflow
- run: python -m pip install uv
- run: source/install/uv_with_retry.sh pip install --system tensorflow
# https://github.com/actions/runner-images/issues/9491
- name: Fix kernel mmap rnd bits
run: sudo sysctl vm.mmap_rnd_bits=28
Expand All @@ -34,11 +35,9 @@ jobs:
CMAKE_GENERATOR: Ninja
CXXFLAGS: ${{ matrix.check_memleak && '-fsanitize=leak' || '' }}
# test lammps
# ASE issue: https://gitlab.com/ase/ase/-/merge_requests/2843
# TODO: remove ase version when ase has new release
- run: |
python -m pip install -U pip
python -m pip install -e .[cpu,test,lmp] mpi4py "ase @ https://gitlab.com/ase/ase/-/archive/8c5aa5fd6448c5cfb517a014dccf2b214a9dfa8f/ase-8c5aa5fd6448c5cfb517a014dccf2b214a9dfa8f.tar.gz"
export TENSORFLOW_ROOT=$(python -c 'import importlib,pathlib;print(pathlib.Path(importlib.util.find_spec("tensorflow").origin).parent)')
source/install/uv_with_retry.sh pip install --system -e .[cpu,test,lmp] mpi4py
env:
DP_BUILD_TESTING: 1
if: ${{ !matrix.check_memleak }}
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ jobs:
&& sudo apt-get update \
&& sudo apt-get -y install cuda-12-2 libcudnn8=8.9.5.*-1+cuda12.2
if: false # skip as we use nvidia image
- name: Set PyPI mirror for Aliyun cloud machine
run: python -m pip config --user set global.index-url https://mirrors.aliyun.com/pypi/simple/
- run: python -m pip install -U "pip>=21.3.1,!=23.0.0"
- run: python -m pip install "tensorflow>=2.15.0rc0"
- run: python -m pip install -v -e .[gpu,test,lmp,cu12] "ase @ https://gitlab.com/ase/ase/-/archive/8c5aa5fd6448c5cfb517a014dccf2b214a9dfa8f/ase-8c5aa5fd6448c5cfb517a014dccf2b214a9dfa8f.tar.gz"
- run: python -m pip install -U uv
- run: source/install/uv_with_retry.sh pip install --system "tensorflow>=2.15.0rc0"
- run: source/install/uv_with_retry.sh pip install --system -v -e .[gpu,test,lmp,cu12]
env:
DP_BUILD_TESTING: 1
DP_VARIANT: cuda
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- uses: mpi4py/setup-mpi@v1
if: ${{ matrix.tf == '' }}
with:
mpi: openmpi
# https://github.com/pypa/pip/issues/11770
- run: python -m pip install -U "pip>=21.3.1,!=23.0.0"
- run: pip install -e .[cpu,test]
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: source/install/uv_with_retry.sh pip install --system -e .[cpu,test]
env:
# Please note that uv has some issues with finding
# existing TensorFlow package. Currently, it uses
# TensorFlow in the build dependency, but if it
# changes, setting `TENSORFLOW_ROOT`.
TENSORFLOW_VERSION: ${{ matrix.tf }}
DP_BUILD_TESTING: 1
- run: pip install horovod mpi4py
- run: source/install/uv_with_retry.sh pip install --system --no-build-isolation horovod mpi4py
if: ${{ matrix.tf == '' }}
env:
HOROVOD_WITH_TENSORFLOW: 1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ build_cc_tests
build_c_tests
build_c/
libdeepmd_c/
.uv/
25 changes: 22 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude: "^.+\\.pbtxt$"
Expand All @@ -29,7 +29,7 @@ repos:
exclude: ^source/3rdparty
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.5
rev: v0.4.10
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -52,7 +52,7 @@ repos:
- id: blacken-docs
# C++
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.2
rev: v18.1.7
hooks:
- id: clang-format
exclude: ^source/3rdparty|source/lib/src/gpu/cudart/.+\.inc
Expand All @@ -75,6 +75,25 @@ repos:
hooks:
- id: cmake-format
#- id: cmake-lint
- repo: https://github.com/njzjz/mirrors-bibtex-tidy
rev: v1.13.0
hooks:
- id: bibtex-tidy
args:
- --curly
- --numeric
- --align=13
- --blank-lines
# disable sort: the order of keys and fields has explict meanings
#- --sort=key
- --duplicates=key,doi,citation,abstract
- --merge=combine
#- --sort-fields
#- --strip-comments
- --trailing-commas
- --encode-urls
- --remove-empty-fields
- --wrap=80
# license header
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
Expand Down
9 changes: 6 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: mambaforge-4.10
conda:
environment: doc/environment.yml
python: "3.11"
jobs:
post_create_environment:
- pip install uv
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install -r doc/requirements.txt
formats: all
Loading