From c94608a5977283cae74b971eaa68d0e3e6d31523 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 03:46:42 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- deepmd/pt/model/task/dos.py | 9 --------- deepmd/pt/model/task/invar_fitting.py | 8 -------- deepmd/pt/model/task/polarizability.py | 10 ---------- source/tests/pt/model/test_polar_stat.py | 1 + 4 files changed, 1 insertion(+), 27 deletions(-) diff --git a/deepmd/pt/model/task/dos.py b/deepmd/pt/model/task/dos.py index 20f954c076..c37b05277a 100644 --- a/deepmd/pt/model/task/dos.py +++ b/deepmd/pt/model/task/dos.py @@ -2,13 +2,11 @@ import copy import logging from typing import ( - Callable, List, Optional, Union, ) -import numpy as np import torch from deepmd.dpmodel import ( @@ -30,13 +28,6 @@ from deepmd.pt.utils.utils import ( to_numpy_array, ) -from deepmd.utils.out_stat import ( - compute_stats_from_atomic, - compute_stats_from_redu, -) -from deepmd.utils.path import ( - DPPath, -) from deepmd.utils.version import ( check_version_compatibility, ) diff --git a/deepmd/pt/model/task/invar_fitting.py b/deepmd/pt/model/task/invar_fitting.py index e7b5fac567..ea46a552e5 100644 --- a/deepmd/pt/model/task/invar_fitting.py +++ b/deepmd/pt/model/task/invar_fitting.py @@ -2,10 +2,8 @@ import copy import logging from typing import ( - Callable, List, Optional, - Union, ) import torch @@ -24,12 +22,6 @@ from deepmd.pt.utils.env import ( DEFAULT_PRECISION, ) -from deepmd.pt.utils.stat import ( - compute_output_stats, -) -from deepmd.utils.path import ( - DPPath, -) from deepmd.utils.version import ( check_version_compatibility, ) diff --git a/deepmd/pt/model/task/polarizability.py b/deepmd/pt/model/task/polarizability.py index 9a8f742c33..3f7e4f5760 100644 --- a/deepmd/pt/model/task/polarizability.py +++ b/deepmd/pt/model/task/polarizability.py @@ -2,13 +2,11 @@ import copy import logging from typing import ( - Callable, List, Optional, Union, ) -import numpy as np import torch from deepmd.dpmodel import ( @@ -27,13 +25,6 @@ from deepmd.pt.utils.utils import ( to_numpy_array, ) -from deepmd.utils.out_stat import ( - compute_stats_from_atomic, - compute_stats_from_redu, -) -from deepmd.utils.path import ( - DPPath, -) from deepmd.utils.version import ( check_version_compatibility, ) @@ -194,7 +185,6 @@ def output_def(self) -> FittingOutputDef: ] ) - def forward( self, descriptor: torch.Tensor, diff --git a/source/tests/pt/model/test_polar_stat.py b/source/tests/pt/model/test_polar_stat.py index b288a885f7..1635dec044 100644 --- a/source/tests/pt/model/test_polar_stat.py +++ b/source/tests/pt/model/test_polar_stat.py @@ -17,6 +17,7 @@ PolarFittingSeA, ) + @unittest.skip class TestConsistency(unittest.TestCase): def setUp(self) -> None: