From 79f98cac8049b4ca22d2f42fe57bc715b5a65e01 Mon Sep 17 00:00:00 2001 From: Han Wang <92130845+wanghan-iapcm@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:52:43 +0800 Subject: [PATCH] test: pt: mv all model related tests to the pt/test/model folder (#3234) Co-authored-by: Han Wang --- source/tests/pt/model/__init__.py | 1 + source/tests/pt/{ => model}/models/dpa1.json | 0 source/tests/pt/{ => model}/models/dpa1.pth | Bin source/tests/pt/{ => model}/models/dpa2.json | 0 source/tests/pt/{ => model}/models/dpa2.pth | Bin source/tests/pt/{ => model}/models/dpa2_hyb.json | 0 source/tests/pt/{ => model}/models/dpa2_tebd.pth | Bin source/tests/pt/{ => model}/test_autodiff.py | 0 source/tests/pt/{ => model}/test_deeppot.py | 0 source/tests/pt/{ => model}/test_descriptor.py | 0 source/tests/pt/{ => model}/test_descriptor_dpa1.py | 0 source/tests/pt/{ => model}/test_descriptor_dpa2.py | 0 source/tests/pt/{ => model}/test_dp_atomic_model.py | 0 source/tests/pt/{ => model}/test_dp_model.py | 0 source/tests/pt/{ => model}/test_embedding_net.py | 0 source/tests/pt/{ => model}/test_ener_fitting.py | 0 source/tests/pt/{ => model}/test_env_mat.py | 0 source/tests/pt/{ => model}/test_fitting_net.py | 0 source/tests/pt/{ => model}/test_force_grad.py | 0 source/tests/pt/{ => model}/test_jit.py | 0 source/tests/pt/{ => model}/test_mlp.py | 0 source/tests/pt/{ => model}/test_model.py | 0 source/tests/pt/{ => model}/test_nlist.py | 0 source/tests/pt/{ => model}/test_pairtab.py | 0 source/tests/pt/{ => model}/test_permutation.py | 0 .../pt/{ => model}/test_permutation_denoise.py | 0 source/tests/pt/{ => model}/test_region.py | 0 source/tests/pt/{ => model}/test_rot.py | 0 source/tests/pt/{ => model}/test_rot_denoise.py | 0 source/tests/pt/{ => model}/test_rotation.py | 0 source/tests/pt/{ => model}/test_saveload_dpa1.py | 0 .../tests/pt/{ => model}/test_saveload_se_e2_a.py | 0 source/tests/pt/{ => model}/test_se_e2_a.py | 0 source/tests/pt/{ => model}/test_smooth.py | 0 source/tests/pt/{ => model}/test_smooth_denoise.py | 0 source/tests/pt/{ => model}/test_trans.py | 0 source/tests/pt/{ => model}/test_trans_denoise.py | 0 source/tests/pt/{ => model}/test_unused_params.py | 0 .../{ => model}/water/data/data_0/set.000/box.npy | Bin .../{ => model}/water/data/data_0/set.000/coord.npy | Bin .../water/data/data_0/set.000/energy.npy | Bin .../{ => model}/water/data/data_0/set.000/force.npy | Bin .../tests/pt/{ => model}/water/data/data_0/type.raw | 0 .../pt/{ => model}/water/data/data_0/type_map.raw | 0 .../{ => model}/water/data/single/set.000/box.npy | Bin .../{ => model}/water/data/single/set.000/coord.npy | Bin .../water/data/single/set.000/energy.npy | Bin .../{ => model}/water/data/single/set.000/force.npy | Bin .../tests/pt/{ => model}/water/data/single/type.raw | 0 .../pt/{ => model}/water/data/single/type_map.raw | 0 source/tests/pt/{ => model}/water/lkf.json | 0 source/tests/pt/{ => model}/water/se_atten.json | 0 source/tests/pt/{ => model}/water/se_e2_a.json | 0 source/tests/pt/test_training.py | 2 +- source/tests/pt/water | 1 + 55 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 source/tests/pt/model/__init__.py rename source/tests/pt/{ => model}/models/dpa1.json (100%) rename source/tests/pt/{ => model}/models/dpa1.pth (100%) rename source/tests/pt/{ => model}/models/dpa2.json (100%) rename source/tests/pt/{ => model}/models/dpa2.pth (100%) rename source/tests/pt/{ => model}/models/dpa2_hyb.json (100%) rename source/tests/pt/{ => model}/models/dpa2_tebd.pth (100%) rename source/tests/pt/{ => model}/test_autodiff.py (100%) rename source/tests/pt/{ => model}/test_deeppot.py (100%) rename source/tests/pt/{ => model}/test_descriptor.py (100%) rename source/tests/pt/{ => model}/test_descriptor_dpa1.py (100%) rename source/tests/pt/{ => model}/test_descriptor_dpa2.py (100%) rename source/tests/pt/{ => model}/test_dp_atomic_model.py (100%) rename source/tests/pt/{ => model}/test_dp_model.py (100%) rename source/tests/pt/{ => model}/test_embedding_net.py (100%) rename source/tests/pt/{ => model}/test_ener_fitting.py (100%) rename source/tests/pt/{ => model}/test_env_mat.py (100%) rename source/tests/pt/{ => model}/test_fitting_net.py (100%) rename source/tests/pt/{ => model}/test_force_grad.py (100%) rename source/tests/pt/{ => model}/test_jit.py (100%) rename source/tests/pt/{ => model}/test_mlp.py (100%) rename source/tests/pt/{ => model}/test_model.py (100%) rename source/tests/pt/{ => model}/test_nlist.py (100%) rename source/tests/pt/{ => model}/test_pairtab.py (100%) rename source/tests/pt/{ => model}/test_permutation.py (100%) rename source/tests/pt/{ => model}/test_permutation_denoise.py (100%) rename source/tests/pt/{ => model}/test_region.py (100%) rename source/tests/pt/{ => model}/test_rot.py (100%) rename source/tests/pt/{ => model}/test_rot_denoise.py (100%) rename source/tests/pt/{ => model}/test_rotation.py (100%) rename source/tests/pt/{ => model}/test_saveload_dpa1.py (100%) rename source/tests/pt/{ => model}/test_saveload_se_e2_a.py (100%) rename source/tests/pt/{ => model}/test_se_e2_a.py (100%) rename source/tests/pt/{ => model}/test_smooth.py (100%) rename source/tests/pt/{ => model}/test_smooth_denoise.py (100%) rename source/tests/pt/{ => model}/test_trans.py (100%) rename source/tests/pt/{ => model}/test_trans_denoise.py (100%) rename source/tests/pt/{ => model}/test_unused_params.py (100%) rename source/tests/pt/{ => model}/water/data/data_0/set.000/box.npy (100%) rename source/tests/pt/{ => model}/water/data/data_0/set.000/coord.npy (100%) rename source/tests/pt/{ => model}/water/data/data_0/set.000/energy.npy (100%) rename source/tests/pt/{ => model}/water/data/data_0/set.000/force.npy (100%) rename source/tests/pt/{ => model}/water/data/data_0/type.raw (100%) rename source/tests/pt/{ => model}/water/data/data_0/type_map.raw (100%) rename source/tests/pt/{ => model}/water/data/single/set.000/box.npy (100%) rename source/tests/pt/{ => model}/water/data/single/set.000/coord.npy (100%) rename source/tests/pt/{ => model}/water/data/single/set.000/energy.npy (100%) rename source/tests/pt/{ => model}/water/data/single/set.000/force.npy (100%) rename source/tests/pt/{ => model}/water/data/single/type.raw (100%) rename source/tests/pt/{ => model}/water/data/single/type_map.raw (100%) rename source/tests/pt/{ => model}/water/lkf.json (100%) rename source/tests/pt/{ => model}/water/se_atten.json (100%) rename source/tests/pt/{ => model}/water/se_e2_a.json (100%) create mode 120000 source/tests/pt/water diff --git a/source/tests/pt/model/__init__.py b/source/tests/pt/model/__init__.py new file mode 100644 index 0000000000..6ceb116d85 --- /dev/null +++ b/source/tests/pt/model/__init__.py @@ -0,0 +1 @@ +# SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/source/tests/pt/models/dpa1.json b/source/tests/pt/model/models/dpa1.json similarity index 100% rename from source/tests/pt/models/dpa1.json rename to source/tests/pt/model/models/dpa1.json diff --git a/source/tests/pt/models/dpa1.pth b/source/tests/pt/model/models/dpa1.pth similarity index 100% rename from source/tests/pt/models/dpa1.pth rename to source/tests/pt/model/models/dpa1.pth diff --git a/source/tests/pt/models/dpa2.json b/source/tests/pt/model/models/dpa2.json similarity index 100% rename from source/tests/pt/models/dpa2.json rename to source/tests/pt/model/models/dpa2.json diff --git a/source/tests/pt/models/dpa2.pth b/source/tests/pt/model/models/dpa2.pth similarity index 100% rename from source/tests/pt/models/dpa2.pth rename to source/tests/pt/model/models/dpa2.pth diff --git a/source/tests/pt/models/dpa2_hyb.json b/source/tests/pt/model/models/dpa2_hyb.json similarity index 100% rename from source/tests/pt/models/dpa2_hyb.json rename to source/tests/pt/model/models/dpa2_hyb.json diff --git a/source/tests/pt/models/dpa2_tebd.pth b/source/tests/pt/model/models/dpa2_tebd.pth similarity index 100% rename from source/tests/pt/models/dpa2_tebd.pth rename to source/tests/pt/model/models/dpa2_tebd.pth diff --git a/source/tests/pt/test_autodiff.py b/source/tests/pt/model/test_autodiff.py similarity index 100% rename from source/tests/pt/test_autodiff.py rename to source/tests/pt/model/test_autodiff.py diff --git a/source/tests/pt/test_deeppot.py b/source/tests/pt/model/test_deeppot.py similarity index 100% rename from source/tests/pt/test_deeppot.py rename to source/tests/pt/model/test_deeppot.py diff --git a/source/tests/pt/test_descriptor.py b/source/tests/pt/model/test_descriptor.py similarity index 100% rename from source/tests/pt/test_descriptor.py rename to source/tests/pt/model/test_descriptor.py diff --git a/source/tests/pt/test_descriptor_dpa1.py b/source/tests/pt/model/test_descriptor_dpa1.py similarity index 100% rename from source/tests/pt/test_descriptor_dpa1.py rename to source/tests/pt/model/test_descriptor_dpa1.py diff --git a/source/tests/pt/test_descriptor_dpa2.py b/source/tests/pt/model/test_descriptor_dpa2.py similarity index 100% rename from source/tests/pt/test_descriptor_dpa2.py rename to source/tests/pt/model/test_descriptor_dpa2.py diff --git a/source/tests/pt/test_dp_atomic_model.py b/source/tests/pt/model/test_dp_atomic_model.py similarity index 100% rename from source/tests/pt/test_dp_atomic_model.py rename to source/tests/pt/model/test_dp_atomic_model.py diff --git a/source/tests/pt/test_dp_model.py b/source/tests/pt/model/test_dp_model.py similarity index 100% rename from source/tests/pt/test_dp_model.py rename to source/tests/pt/model/test_dp_model.py diff --git a/source/tests/pt/test_embedding_net.py b/source/tests/pt/model/test_embedding_net.py similarity index 100% rename from source/tests/pt/test_embedding_net.py rename to source/tests/pt/model/test_embedding_net.py diff --git a/source/tests/pt/test_ener_fitting.py b/source/tests/pt/model/test_ener_fitting.py similarity index 100% rename from source/tests/pt/test_ener_fitting.py rename to source/tests/pt/model/test_ener_fitting.py diff --git a/source/tests/pt/test_env_mat.py b/source/tests/pt/model/test_env_mat.py similarity index 100% rename from source/tests/pt/test_env_mat.py rename to source/tests/pt/model/test_env_mat.py diff --git a/source/tests/pt/test_fitting_net.py b/source/tests/pt/model/test_fitting_net.py similarity index 100% rename from source/tests/pt/test_fitting_net.py rename to source/tests/pt/model/test_fitting_net.py diff --git a/source/tests/pt/test_force_grad.py b/source/tests/pt/model/test_force_grad.py similarity index 100% rename from source/tests/pt/test_force_grad.py rename to source/tests/pt/model/test_force_grad.py diff --git a/source/tests/pt/test_jit.py b/source/tests/pt/model/test_jit.py similarity index 100% rename from source/tests/pt/test_jit.py rename to source/tests/pt/model/test_jit.py diff --git a/source/tests/pt/test_mlp.py b/source/tests/pt/model/test_mlp.py similarity index 100% rename from source/tests/pt/test_mlp.py rename to source/tests/pt/model/test_mlp.py diff --git a/source/tests/pt/test_model.py b/source/tests/pt/model/test_model.py similarity index 100% rename from source/tests/pt/test_model.py rename to source/tests/pt/model/test_model.py diff --git a/source/tests/pt/test_nlist.py b/source/tests/pt/model/test_nlist.py similarity index 100% rename from source/tests/pt/test_nlist.py rename to source/tests/pt/model/test_nlist.py diff --git a/source/tests/pt/test_pairtab.py b/source/tests/pt/model/test_pairtab.py similarity index 100% rename from source/tests/pt/test_pairtab.py rename to source/tests/pt/model/test_pairtab.py diff --git a/source/tests/pt/test_permutation.py b/source/tests/pt/model/test_permutation.py similarity index 100% rename from source/tests/pt/test_permutation.py rename to source/tests/pt/model/test_permutation.py diff --git a/source/tests/pt/test_permutation_denoise.py b/source/tests/pt/model/test_permutation_denoise.py similarity index 100% rename from source/tests/pt/test_permutation_denoise.py rename to source/tests/pt/model/test_permutation_denoise.py diff --git a/source/tests/pt/test_region.py b/source/tests/pt/model/test_region.py similarity index 100% rename from source/tests/pt/test_region.py rename to source/tests/pt/model/test_region.py diff --git a/source/tests/pt/test_rot.py b/source/tests/pt/model/test_rot.py similarity index 100% rename from source/tests/pt/test_rot.py rename to source/tests/pt/model/test_rot.py diff --git a/source/tests/pt/test_rot_denoise.py b/source/tests/pt/model/test_rot_denoise.py similarity index 100% rename from source/tests/pt/test_rot_denoise.py rename to source/tests/pt/model/test_rot_denoise.py diff --git a/source/tests/pt/test_rotation.py b/source/tests/pt/model/test_rotation.py similarity index 100% rename from source/tests/pt/test_rotation.py rename to source/tests/pt/model/test_rotation.py diff --git a/source/tests/pt/test_saveload_dpa1.py b/source/tests/pt/model/test_saveload_dpa1.py similarity index 100% rename from source/tests/pt/test_saveload_dpa1.py rename to source/tests/pt/model/test_saveload_dpa1.py diff --git a/source/tests/pt/test_saveload_se_e2_a.py b/source/tests/pt/model/test_saveload_se_e2_a.py similarity index 100% rename from source/tests/pt/test_saveload_se_e2_a.py rename to source/tests/pt/model/test_saveload_se_e2_a.py diff --git a/source/tests/pt/test_se_e2_a.py b/source/tests/pt/model/test_se_e2_a.py similarity index 100% rename from source/tests/pt/test_se_e2_a.py rename to source/tests/pt/model/test_se_e2_a.py diff --git a/source/tests/pt/test_smooth.py b/source/tests/pt/model/test_smooth.py similarity index 100% rename from source/tests/pt/test_smooth.py rename to source/tests/pt/model/test_smooth.py diff --git a/source/tests/pt/test_smooth_denoise.py b/source/tests/pt/model/test_smooth_denoise.py similarity index 100% rename from source/tests/pt/test_smooth_denoise.py rename to source/tests/pt/model/test_smooth_denoise.py diff --git a/source/tests/pt/test_trans.py b/source/tests/pt/model/test_trans.py similarity index 100% rename from source/tests/pt/test_trans.py rename to source/tests/pt/model/test_trans.py diff --git a/source/tests/pt/test_trans_denoise.py b/source/tests/pt/model/test_trans_denoise.py similarity index 100% rename from source/tests/pt/test_trans_denoise.py rename to source/tests/pt/model/test_trans_denoise.py diff --git a/source/tests/pt/test_unused_params.py b/source/tests/pt/model/test_unused_params.py similarity index 100% rename from source/tests/pt/test_unused_params.py rename to source/tests/pt/model/test_unused_params.py diff --git a/source/tests/pt/water/data/data_0/set.000/box.npy b/source/tests/pt/model/water/data/data_0/set.000/box.npy similarity index 100% rename from source/tests/pt/water/data/data_0/set.000/box.npy rename to source/tests/pt/model/water/data/data_0/set.000/box.npy diff --git a/source/tests/pt/water/data/data_0/set.000/coord.npy b/source/tests/pt/model/water/data/data_0/set.000/coord.npy similarity index 100% rename from source/tests/pt/water/data/data_0/set.000/coord.npy rename to source/tests/pt/model/water/data/data_0/set.000/coord.npy diff --git a/source/tests/pt/water/data/data_0/set.000/energy.npy b/source/tests/pt/model/water/data/data_0/set.000/energy.npy similarity index 100% rename from source/tests/pt/water/data/data_0/set.000/energy.npy rename to source/tests/pt/model/water/data/data_0/set.000/energy.npy diff --git a/source/tests/pt/water/data/data_0/set.000/force.npy b/source/tests/pt/model/water/data/data_0/set.000/force.npy similarity index 100% rename from source/tests/pt/water/data/data_0/set.000/force.npy rename to source/tests/pt/model/water/data/data_0/set.000/force.npy diff --git a/source/tests/pt/water/data/data_0/type.raw b/source/tests/pt/model/water/data/data_0/type.raw similarity index 100% rename from source/tests/pt/water/data/data_0/type.raw rename to source/tests/pt/model/water/data/data_0/type.raw diff --git a/source/tests/pt/water/data/data_0/type_map.raw b/source/tests/pt/model/water/data/data_0/type_map.raw similarity index 100% rename from source/tests/pt/water/data/data_0/type_map.raw rename to source/tests/pt/model/water/data/data_0/type_map.raw diff --git a/source/tests/pt/water/data/single/set.000/box.npy b/source/tests/pt/model/water/data/single/set.000/box.npy similarity index 100% rename from source/tests/pt/water/data/single/set.000/box.npy rename to source/tests/pt/model/water/data/single/set.000/box.npy diff --git a/source/tests/pt/water/data/single/set.000/coord.npy b/source/tests/pt/model/water/data/single/set.000/coord.npy similarity index 100% rename from source/tests/pt/water/data/single/set.000/coord.npy rename to source/tests/pt/model/water/data/single/set.000/coord.npy diff --git a/source/tests/pt/water/data/single/set.000/energy.npy b/source/tests/pt/model/water/data/single/set.000/energy.npy similarity index 100% rename from source/tests/pt/water/data/single/set.000/energy.npy rename to source/tests/pt/model/water/data/single/set.000/energy.npy diff --git a/source/tests/pt/water/data/single/set.000/force.npy b/source/tests/pt/model/water/data/single/set.000/force.npy similarity index 100% rename from source/tests/pt/water/data/single/set.000/force.npy rename to source/tests/pt/model/water/data/single/set.000/force.npy diff --git a/source/tests/pt/water/data/single/type.raw b/source/tests/pt/model/water/data/single/type.raw similarity index 100% rename from source/tests/pt/water/data/single/type.raw rename to source/tests/pt/model/water/data/single/type.raw diff --git a/source/tests/pt/water/data/single/type_map.raw b/source/tests/pt/model/water/data/single/type_map.raw similarity index 100% rename from source/tests/pt/water/data/single/type_map.raw rename to source/tests/pt/model/water/data/single/type_map.raw diff --git a/source/tests/pt/water/lkf.json b/source/tests/pt/model/water/lkf.json similarity index 100% rename from source/tests/pt/water/lkf.json rename to source/tests/pt/model/water/lkf.json diff --git a/source/tests/pt/water/se_atten.json b/source/tests/pt/model/water/se_atten.json similarity index 100% rename from source/tests/pt/water/se_atten.json rename to source/tests/pt/model/water/se_atten.json diff --git a/source/tests/pt/water/se_e2_a.json b/source/tests/pt/model/water/se_e2_a.json similarity index 100% rename from source/tests/pt/water/se_e2_a.json rename to source/tests/pt/model/water/se_e2_a.json diff --git a/source/tests/pt/test_training.py b/source/tests/pt/test_training.py index 574ca8688e..2186467788 100644 --- a/source/tests/pt/test_training.py +++ b/source/tests/pt/test_training.py @@ -14,7 +14,7 @@ get_trainer, ) -from .test_permutation import ( +from .model.test_permutation import ( model_dpa1, model_dpa2, model_hybrid, diff --git a/source/tests/pt/water b/source/tests/pt/water new file mode 120000 index 0000000000..7e5219651f --- /dev/null +++ b/source/tests/pt/water @@ -0,0 +1 @@ +model/water \ No newline at end of file