Skip to content

Commit

Permalink
fix: fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzyphysics committed Mar 29, 2024
1 parent c480fd5 commit d3dc01d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 30 deletions.
13 changes: 7 additions & 6 deletions tests/test_prep_run_caly.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@
skip_ut_with_dflow_reason,
upload_python_packages,
)
from mocked_ops import (
MockedCollRunCaly,
MockedRunCalyModelDevi,
MockedRunDPOptim,
mocked_numb_models,
)

from dpgen2.exploration.task import (
BaseExplorationTaskGroup,
Expand All @@ -86,6 +80,13 @@
)
from dpgen2.utils.step_config import normalize as normalize_step_dict

from .mocked_ops import (
MockedCollRunCaly,
MockedRunCalyModelDevi,
MockedRunDPOptim,
mocked_numb_models,
)

prep_default_config = normalize_step_dict(
{
"template_config": {
Expand Down
21 changes: 11 additions & 10 deletions tests/test_prep_run_dp_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@
skip_ut_with_dflow_reason,
upload_python_packages,
)
from mocked_ops import (
MockedModifyTrainScript,
MockedPrepDPTrain,
MockedRunDPTrain,
MockedRunDPTrainNoneInitModel,
make_mocked_init_data,
make_mocked_init_models,
mocked_numb_models,
mocked_template_script,
)

from dpgen2.constants import (
train_task_pattern,
Expand All @@ -69,6 +59,17 @@
)
from dpgen2.utils.step_config import normalize as normalize_step_dict

from .mocked_ops import (
MockedModifyTrainScript,
MockedPrepDPTrain,
MockedRunDPTrain,
MockedRunDPTrainNoneInitModel,
make_mocked_init_data,
make_mocked_init_models,
mocked_numb_models,
mocked_template_script,
)

default_config = normalize_step_dict(
{
"template_config": {
Expand Down
9 changes: 5 additions & 4 deletions tests/test_prep_run_lmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@
skip_ut_with_dflow_reason,
upload_python_packages,
)
from mocked_ops import (
MockedRunLmp,
mocked_numb_models,
)

from dpgen2.constants import (
lmp_conf_name,
Expand All @@ -80,6 +76,11 @@
)
from dpgen2.utils.step_config import normalize as normalize_step_dict

from .mocked_ops import (
MockedRunLmp,
mocked_numb_models,
)

default_config = normalize_step_dict(
{
"template_config": {
Expand Down
11 changes: 6 additions & 5 deletions tests/test_prep_run_vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@
skip_ut_with_dflow_reason,
upload_python_packages,
)
from mocked_ops import (
MockedPrepVasp,
MockedRunVasp,
mocked_incar_template,
)

from dpgen2.constants import (
fp_task_pattern,
Expand All @@ -70,6 +65,12 @@
)
from dpgen2.utils.step_config import normalize as normalize_step_dict

from .mocked_ops import (
MockedPrepVasp,
MockedRunVasp,
mocked_incar_template,
)

default_config = normalize_step_dict(
{
"template_config": {
Expand Down
10 changes: 5 additions & 5 deletions tests/test_select_confs.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@
except ModuleNotFoundError:
# case of upload everything to argo, no context needed
pass
from mocked_ops import (
from dpgen2.op.select_confs import (
SelectConfs,
)

from .mocked_ops import (
MockedConfSelector,
MockedExplorationReport,
MockedSelectConfs,
)

from dpgen2.op.select_confs import (
SelectConfs,
)


class TestMockedSelectConfs(unittest.TestCase):
def setUp(self):
Expand Down

0 comments on commit d3dc01d

Please sign in to comment.