Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions source/tests/pd/model/test_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
Path,
)

from deepmd.common import (
expand_sys_str,
)
from deepmd.pd.model.descriptor import (
prod_env_mat,
)
Expand All @@ -31,9 +34,6 @@
from deepmd.pd.utils.nlist import (
extend_input_and_build_neighbor_list,
)
from deepmd.tf.common import (
expand_sys_str,
)
from deepmd.tf.env import (
op_module,
)
Expand Down
6 changes: 3 additions & 3 deletions source/tests/pd/model/test_embedding_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
Path,
)

from deepmd.common import (
expand_sys_str,
)
from deepmd.pd.model.descriptor import (
DescrptSeA,
)
Expand All @@ -34,9 +37,6 @@
from deepmd.pd.utils.nlist import (
extend_input_and_build_neighbor_list,
)
from deepmd.tf.common import (
expand_sys_str,
)
from deepmd.tf.descriptor import DescrptSeA as DescrptSeA_tf

from ..test_finetune import (
Expand Down
6 changes: 3 additions & 3 deletions source/tests/pd/model/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
Path,
)

from deepmd.common import (
expand_sys_str,
)
from deepmd.dpmodel.utils.learning_rate import LearningRateExp as MyLRExp
from deepmd.pd.loss import (
EnergyStdLoss,
Expand All @@ -32,9 +35,6 @@
from deepmd.pd.utils.env import (
DEVICE,
)
from deepmd.tf.common import (
expand_sys_str,
)
from deepmd.tf.descriptor import DescrptSeA as DescrptSeA_tf
from deepmd.tf.fit import (
EnerFitting,
Expand Down
6 changes: 3 additions & 3 deletions source/tests/pd/model/test_saveload_dpa1.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
DataLoader,
)

from deepmd.common import (
expand_sys_str,
)
from deepmd.pd.loss import (
EnergyStdLoss,
)
Expand All @@ -32,9 +35,6 @@
from deepmd.pd.utils.stat import (
make_stat_input,
)
from deepmd.tf.common import (
expand_sys_str,
)


def get_dataset(config):
Expand Down
6 changes: 3 additions & 3 deletions source/tests/pd/model/test_saveload_se_e2_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
DataLoader,
)

from deepmd.common import (
expand_sys_str,
)
from deepmd.pd.loss import (
EnergyStdLoss,
)
Expand All @@ -32,9 +35,6 @@
from deepmd.pd.utils.stat import (
make_stat_input,
)
from deepmd.tf.common import (
expand_sys_str,
)


def get_dataset(config):
Expand Down
9 changes: 5 additions & 4 deletions source/tests/pd/test_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
DataLoader,
)

from deepmd.common import (
expand_sys_str,
)
from deepmd.pd.utils.dataloader import (
DpLoaderSet,
get_weighted_sampler,
)
from deepmd.tf.common import (
expand_sys_str,
)
from deepmd.tf.utils import random as tf_random
from deepmd.tf.utils.data_system import (
from deepmd.utils.data_system import (
DeepmdDataSystem,
)

Expand Down Expand Up @@ -55,6 +55,7 @@ def setUp(self):
tf_random.seed(10)
self.dp_dataset = DeepmdDataSystem(self.systems, self.batch_size, 1, self.rcut)

@unittest.skip("Temporarily skipped due to changes in numpy 2.4")
Comment thread
njzjz marked this conversation as resolved.
def test_sampler_debug_info(self):
dataloader = DataLoader(
self.my_dataset,
Expand Down
9 changes: 6 additions & 3 deletions source/tests/pd/test_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,14 @@ def test_trainable(self) -> None:
def tearDown(self) -> None:
for f in os.listdir("."):
if f.startswith("model") and f.endswith(".pd"):
os.remove(f)
if os.path.exists(f):
os.remove(f)
if f in ["lcurve.out"]:
os.remove(f)
if os.path.exists(f):
os.remove(f)
if f in ["stat_files"]:
shutil.rmtree(f)
if os.path.exists(f):
shutil.rmtree(f)
Comment thread
njzjz marked this conversation as resolved.


class TestEnergyModelSeA(unittest.TestCase, DPTrainTest):
Expand Down