Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 28, 2024
1 parent ae4b4a9 commit 633bf8e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def setUpClass(cls) -> None:
"sw_rmax": 4.0,
}


class PropertyAtomicModelTest(AtomicModelTestCase):
@classmethod
def setUpClass(cls) -> None:
Expand All @@ -125,4 +126,4 @@ def setUpClass(cls) -> None:
cls.expected_has_message_passing = False
cls.aprec_dict = {}
cls.rprec_dict = {}
cls.epsilon_dict = {}
cls.epsilon_dict = {}
3 changes: 2 additions & 1 deletion source/tests/universal/common/cases/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def setUpClass(cls) -> None:
}
cls.test_spin = True


class PropertyModelTest(ModelTestCase):
@classmethod
def setUpClass(cls) -> None:
Expand All @@ -153,4 +154,4 @@ def setUpClass(cls) -> None:
cls.aprec_dict = {}
cls.rprec_dict = {}
cls.epsilon_dict = {}
cls.skip_test_autodiff = True
cls.skip_test_autodiff = True
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
DosAtomicModelTest,
EnerAtomicModelTest,
PolarAtomicModelTest,
PropertyAtomicModelTest,
ZBLAtomicModelTest,
PropertyAtomicModelTest
)
from ...dpmodel.descriptor.test_descriptor import (
DescriptorParamDPA1,
Expand Down Expand Up @@ -420,7 +420,10 @@ def setUpClass(cls):
(DescriptorParamDPA2, DescrptDPA2),
), # descrpt_class_param & class
(
*[(param_func, PropertyFittingNet) for param_func in FittingParamPropertyList],
*[
(param_func, PropertyFittingNet)
for param_func in FittingParamPropertyList
],
), # fitting_class_param & class
),
)
Expand Down Expand Up @@ -462,4 +465,4 @@ def setUpClass(cls):
cls.expected_has_message_passing = ds.has_message_passing()
cls.expected_sel_type = ft.get_sel_type()
cls.expected_dim_fparam = ft.get_dim_fparam()
cls.expected_dim_aparam = ft.get_dim_aparam()
cls.expected_dim_aparam = ft.get_dim_aparam()
9 changes: 6 additions & 3 deletions source/tests/universal/pt/atomc_model/test_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
DosAtomicModelTest,
EnerAtomicModelTest,
PolarAtomicModelTest,
ZBLAtomicModelTest,
PropertyAtomicModelTest,
ZBLAtomicModelTest,
)
from ...dpmodel.descriptor.test_descriptor import (
DescriptorParamDPA1,
Expand Down Expand Up @@ -414,7 +414,10 @@ def setUpClass(cls):
(DescriptorParamDPA2, DescrptDPA2),
), # descrpt_class_param & class
(
*[(param_func, PropertyFittingNet) for param_func in FittingParamPropertyList],
*[
(param_func, PropertyFittingNet)
for param_func in FittingParamPropertyList
],
), # fitting_class_param & class
),
)
Expand Down Expand Up @@ -455,4 +458,4 @@ def setUpClass(cls):
cls.expected_has_message_passing = ds.has_message_passing()
cls.expected_sel_type = ft.get_sel_type()
cls.expected_dim_fparam = ft.get_dim_fparam()
cls.expected_dim_aparam = ft.get_dim_aparam()
cls.expected_dim_aparam = ft.get_dim_aparam()
11 changes: 7 additions & 4 deletions source/tests/universal/pt/model/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
DPZBLModel,
EnergyModel,
PolarModel,
SpinEnergyModel,
PropertyModel,
SpinEnergyModel,
)
from deepmd.pt.model.task import (
DipoleFittingNet,
Expand All @@ -44,9 +44,9 @@
DosModelTest,
EnerModelTest,
PolarModelTest,
PropertyModelTest,
SpinEnerModelTest,
ZBLModelTest,
PropertyModelTest,
)
from ...dpmodel.descriptor.test_descriptor import (
DescriptorParamDPA1,
Expand Down Expand Up @@ -731,7 +731,10 @@ def setUpClass(cls):
(DescriptorParamDPA2, DescrptDPA2),
), # descrpt_class_param & class
(
*[(param_func, PropertyFittingNet) for param_func in FittingParamPropertyList],
*[
(param_func, PropertyFittingNet)
for param_func in FittingParamPropertyList
],
), # fitting_class_param & class
),
)
Expand Down Expand Up @@ -799,4 +802,4 @@ def setUpClass(cls):
cls.expected_has_message_passing = ds.has_message_passing()
cls.expected_sel_type = ft.get_sel_type()
cls.expected_dim_fparam = ft.get_dim_fparam()
cls.expected_dim_aparam = ft.get_dim_aparam()
cls.expected_dim_aparam = ft.get_dim_aparam()

0 comments on commit 633bf8e

Please sign in to comment.