Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
dac29f2
feat(tf2): add eager TensorFlow array backend
njzjz Jun 27, 2026
016c5d0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 27, 2026
e05137d
test(tf2): isolate consistent backend checks
njzjz Jun 28, 2026
dfa958b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 28, 2026
d300f50
test(tf2): cover descriptor and fitting consistency
njzjz Jun 28, 2026
7ef11a5
test(tf2): cover supported descriptor and fitting backends
njzjz Jun 28, 2026
21b7f57
fix(tf2): avoid symbolic shape asserts during export
njzjz Jun 28, 2026
41875ae
fix(tf2): satisfy ndtensorflow dtype lint
njzjz Jun 28, 2026
63f18f8
fix(dpmodel): use array-api linalg diagonal
njzjz Jun 28, 2026
6aeb61b
fix(tf2): compute atomic virial correction
njzjz Jun 28, 2026
cecc199
test(tf2): broaden consistent coverage
njzjz Jun 28, 2026
22c0d97
ci(tf2): run consistent tests in eager step
njzjz Jun 28, 2026
a88e66a
refactor(tf2): reuse dpmodel array api helpers
njzjz Jun 28, 2026
44ef6a4
set DP_CI_IMPORT_PADDLE_BEFORE_TF to 1
njzjz Jun 28, 2026
00b4994
Apply suggestion from @njzjz
njzjz Jun 28, 2026
8289562
test(tf2): clarify savedmodel cpp coverage
njzjz Jun 28, 2026
14368bb
fix(tf2): export savedmodeltf for cxx inference
njzjz Jun 28, 2026
fb8d682
fix(tf2): mask invalid mapping in savedmodel
njzjz Jun 28, 2026
e8c5059
fix(tf2): support dynamic masks and message metadata
njzjz Jun 28, 2026
800cf10
ci: allow empty TF2 eager test shards
njzjz-bot Jun 28, 2026
32817dc
fix(tf2): cover ndtensorflow array API regressions
njzjz Jun 28, 2026
185e59e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 28, 2026
7daa761
docs(dpmodel): document format_nlist
njzjz Jun 29, 2026
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
28 changes: 26 additions & 2 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,36 @@ jobs:
DP_CI_IMPORT_PADDLE_BEFORE_TF: 1
FLAGS_use_stride_compute_kernel: 0
- name: Test TF2 eager mode
run: pytest --cov=deepmd --cov-append source/tests/consistent/io/test_io.py source/jax2tf_tests
run: |
run_pytest_allow_no_tests() {
set +e
pytest "$@"
local status=$?
set -e
if [ "$status" -eq 5 ]; then
# pytest-split may leave an individual shard with no selected
# tests after path/-k filtering. Other shards still cover the
# selected tests, so do not fail the whole matrix for exit 5.
return 0
fi
return "$status"
}

run_pytest_allow_no_tests --cov=deepmd --cov-append \
source/tests/consistent/io/test_io.py \
source/jax2tf_tests \
--splits 12 \
--group ${{ matrix.group }}
run_pytest_allow_no_tests --cov=deepmd --cov-append \
source/tests/consistent \
-k tf2 \
--splits 12 \
--group ${{ matrix.group }}
env:
NUM_WORKERS: 0
DP_TEST_TF2_ONLY: 1
DP_DTYPE_PROMOTION_STRICT: 1
if: matrix.group == 1
DP_CI_IMPORT_PADDLE_BEFORE_TF: 1
- run: mv .test_durations .test_durations_${{ matrix.group }}
- name: Upload partial durations
uses: actions/upload-artifact@v7
Expand Down
2 changes: 2 additions & 0 deletions deepmd/_vendors/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
"""Vendored third-party modules used by DeePMD-kit."""
38 changes: 38 additions & 0 deletions deepmd/_vendors/ndtensorflow/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
from __future__ import (
annotations,
)

from typing import (
Final,
)

from . import (
fft,
linalg,
)
from ._array import (
Array,
)
from ._info import (
__array_namespace_info__,
)
from ._namespace import *
from ._namespace import __all__ as _namespace_all

__array_api_version__: Final = "2025.12"

__all__ = sorted(
set(_namespace_all)
| {
"Array",
"__array_api_version__",
"__array_namespace_info__",
"fft",
"linalg",
}
)


def __dir__() -> list[str]:
return __all__
Loading
Loading