Skip to content

Commit

Permalink
implement exploration report by BigParameter (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
  • Loading branch information
wanghan-iapcm and Han Wang committed Jun 14, 2022
1 parent ecffb70 commit 2ea1eb7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion dpgen2/flow/dpgen_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
OPIOSign,
Artifact,
Slices,
BigParameter,
)
import pickle, jsonpickle, os
from typing import (
Expand All @@ -47,7 +48,7 @@ class SchedulerWrapper(OP):
def get_input_sign(cls):
return OPIOSign({
"exploration_scheduler" : Artifact(Path),
"exploration_report": ExplorationReport,
"exploration_report": BigParameter(ExplorationReport),
"trajs": Artifact(List[Path]),
})

Expand Down
2 changes: 1 addition & 1 deletion dpgen2/op/select_confs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_input_sign(cls):
@classmethod
def get_output_sign(cls):
return OPIOSign({
"report" : ExplorationReport,
"report" : BigParameter(ExplorationReport),

"confs" : Artifact(List[Path]),
})
Expand Down
2 changes: 1 addition & 1 deletion tests/test_block_cl.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def test(self):
step = wf.query_step(name='step')[0]
self.assertEqual(step.phase, "Succeeded")

report = jsonpickle.decode(step.outputs.parameters['exploration_report'].value)
report = step.outputs.parameters['exploration_report'].value
download_artifact(step.outputs.artifacts["iter_data"], path = 'iter_data')
download_artifact(step.outputs.artifacts["models"], path = Path('models')/self.name)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_prep_run_lmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,6 @@ def test(self):
download_artifact(step.outputs.artifacts["trajs"])
download_artifact(step.outputs.artifacts["logs"])

for ii in jsonpickle.decode(step.outputs.parameters['task_names'].value):
for ii in step.outputs.parameters['task_names'].value:
self.check_run_lmp_output(ii, self.model_list)

2 changes: 1 addition & 1 deletion tests/test_prep_run_vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def test(self):
download_artifact(step.outputs.artifacts["labeled_data"])
download_artifact(step.outputs.artifacts["logs"])

for ii in jsonpickle.decode(step.outputs.parameters['task_names'].value):
for ii in step.outputs.parameters['task_names'].value:
self.check_run_vasp_output(ii)

# for ii in range(6):
Expand Down

0 comments on commit 2ea1eb7

Please sign in to comment.