Skip to content

Commit

Permalink
fix tests on py38
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Sep 23, 2024
1 parent b8a33b1 commit a89f1eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/tests/consistent/test_activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import sys
import unittest

import array_api_strict as xp
import numpy as np

from deepmd.common import (
Expand Down Expand Up @@ -69,6 +68,8 @@ def test_pt_consistent_with_ref(self):
sys.version_info >= (3, 9), "array_api_strict doesn't support Python<=3.8"
)
def test_arary_api_strict(self):
import array_api_strict as xp

xp.set_array_api_strict_flags(
api_version=get_activation_fn_dp.array_api_version
)
Expand Down
2 changes: 2 additions & 0 deletions source/tests/consistent/test_type_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
jnp,
)
from deepmd.jax.utils.type_embed import TypeEmbedNet as TypeEmbedNetJAX
else:
TypeEmbedNetJAX = object


@parameterized(
Expand Down

0 comments on commit a89f1eb

Please sign in to comment.