Skip to content

Commit aba932c

Browse files
authored
ci: skip test_data_equal on the GPU machine (#4260)
This test crashes on the machine iZ0xih0eykcp6eddga4w5iZ with exit code 1: https://github.com/deepmodeling/deepmd-kit/actions/runs/11533273426/job/32106001782 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Enhanced test execution control to ensure compatibility with CPU environments during continuous integration. - **Tests** - Updated the `test_data_equal` method to conditionally skip tests based on the testing device and CI status. - Retained cleanup procedures in the `tearDown` method to ensure proper test environment management. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
1 parent 13e247e commit aba932c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source/tests/consistent/io/test_io.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
DeepEval,
2222
)
2323

24+
from ...utils import (
25+
CI,
26+
TEST_DEVICE,
27+
)
28+
2429
infer_path = Path(__file__).parent.parent.parent / "infer"
2530

2631

@@ -66,6 +71,7 @@ def tearDown(self):
6671
elif Path(ii).is_dir():
6772
shutil.rmtree(ii)
6873

74+
@unittest.skipIf(TEST_DEVICE != "cpu" and CI, "Only test on CPU.")
6975
def test_data_equal(self):
7076
prefix = "test_consistent_io_" + self.__class__.__name__.lower()
7177
for backend_name in ("tensorflow", "pytorch", "dpmodel", "jax"):

0 commit comments

Comments
 (0)