File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 Path ,
1414)
1515
16+ from deepmd .common import (
17+ expand_sys_str ,
18+ )
1619from deepmd .pd .model .descriptor import (
1720 prod_env_mat ,
1821)
3134from deepmd .pd .utils .nlist import (
3235 extend_input_and_build_neighbor_list ,
3336)
34- from deepmd .tf .common import (
35- expand_sys_str ,
36- )
3737from deepmd .tf .env import (
3838 op_module ,
3939)
Original file line number Diff line number Diff line change 1818 Path ,
1919)
2020
21+ from deepmd .common import (
22+ expand_sys_str ,
23+ )
2124from deepmd .pd .model .descriptor import (
2225 DescrptSeA ,
2326)
3437from deepmd .pd .utils .nlist import (
3538 extend_input_and_build_neighbor_list ,
3639)
37- from deepmd .tf .common import (
38- expand_sys_str ,
39- )
4040from deepmd .tf .descriptor import DescrptSeA as DescrptSeA_tf
4141
4242from ..test_finetune import (
Original file line number Diff line number Diff line change 1919 Path ,
2020)
2121
22+ from deepmd .common import (
23+ expand_sys_str ,
24+ )
2225from deepmd .dpmodel .utils .learning_rate import LearningRateExp as MyLRExp
2326from deepmd .pd .loss import (
2427 EnergyStdLoss ,
3235from deepmd .pd .utils .env import (
3336 DEVICE ,
3437)
35- from deepmd .tf .common import (
36- expand_sys_str ,
37- )
3838from deepmd .tf .descriptor import DescrptSeA as DescrptSeA_tf
3939from deepmd .tf .fit import (
4040 EnerFitting ,
Original file line number Diff line number Diff line change 1313 DataLoader ,
1414)
1515
16+ from deepmd .common import (
17+ expand_sys_str ,
18+ )
1619from deepmd .pd .loss import (
1720 EnergyStdLoss ,
1821)
3235from deepmd .pd .utils .stat import (
3336 make_stat_input ,
3437)
35- from deepmd .tf .common import (
36- expand_sys_str ,
37- )
3838
3939
4040def get_dataset (config ):
Original file line number Diff line number Diff line change 1313 DataLoader ,
1414)
1515
16+ from deepmd .common import (
17+ expand_sys_str ,
18+ )
1619from deepmd .pd .loss import (
1720 EnergyStdLoss ,
1821)
3235from deepmd .pd .utils .stat import (
3336 make_stat_input ,
3437)
35- from deepmd .tf .common import (
36- expand_sys_str ,
37- )
3838
3939
4040def get_dataset (config ):
Original file line number Diff line number Diff line change @@ -136,11 +136,14 @@ def test_trainable(self) -> None:
136136 def tearDown (self ) -> None :
137137 for f in os .listdir ("." ):
138138 if f .startswith ("model" ) and f .endswith (".pd" ):
139- os .remove (f )
139+ if os .path .exists (f ):
140+ os .remove (f )
140141 if f in ["lcurve.out" ]:
141- os .remove (f )
142+ if os .path .exists (f ):
143+ os .remove (f )
142144 if f in ["stat_files" ]:
143- shutil .rmtree (f )
145+ if os .path .exists (f ):
146+ shutil .rmtree (f )
144147
145148
146149class TestEnergyModelSeA (unittest .TestCase , DPTrainTest ):
You can’t perform that action at this time.
0 commit comments