Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
  • Loading branch information
njzjz committed Nov 7, 2024
1 parent 95c476b commit 8bef185
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
15 changes: 7 additions & 8 deletions source/tests/jax/jax2tf/test_nlist.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
# SPDX-License-Identifier: LGPL-3.0-or-later

import pytest
import tensorflow as tf
import tensorflow.experimental.numpy as tnp

from ...utils import (
DP_TEST_TF2_ONLY,
)

pytest.mark.skipif(
not DP_TEST_TF2_ONLY, reason="TF2 conflicts with TF1", allow_module_level=True
)


if DP_TEST_TF2_ONLY:
import tensorflow as tf
import tensorflow.experimental.numpy as tnp

from deepmd.jax.jax2tf.nlist import (
build_neighbor_list,
extend_coord_with_ghosts,
Expand All @@ -26,6 +20,11 @@
dtype = tnp.float64


pytest.mark.skipif(
not DP_TEST_TF2_ONLY, reason="TF2 conflicts with TF1", allow_module_level=True
)


class TestNeighList(tf.test.TestCase):
def setUp(self):
self.nf = 3
Expand Down
19 changes: 8 additions & 11 deletions source/tests/jax/jax2tf/test_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,25 @@


import pytest
import tensorflow as tf
import tensorflow.experimental.numpy as tnp

from ...seed import (
GLOBAL_SEED,
)
from ...utils import (
DP_TEST_TF2_ONLY,
)

pytest.mark.skipif(
not DP_TEST_TF2_ONLY, reason="TF2 conflicts with TF1", allow_module_level=True
)


if DP_TEST_TF2_ONLY:
import tensorflow as tf
import tensorflow.experimental.numpy as tnp

from deepmd.jax.jax2tf.region import (
inter2phys,
to_face_distance,
)

from ...seed import (
GLOBAL_SEED,
)
pytest.mark.skipif(
not DP_TEST_TF2_ONLY, reason="TF2 conflicts with TF1", allow_module_level=True
)


class TestRegion(tf.test.TestCase):
Expand Down

0 comments on commit 8bef185

Please sign in to comment.