SmartSim icon indicating copy to clipboard operation
SmartSim copied to clipboard

Job dependance feature

Open Spartee opened this issue 3 years ago • 1 comments

Description

sometimes in a workflow, you only want something to run if the job before it ran successfully without error. This should be possible through a few small additions to SmartSim

Implementation Strategy

Methods will be added to the EntityList and Entity base classes that specify dependance on other jobs.

ex.

from smartsim import Experiment
exp = Experiment("hello_world", launcher="local")
model = exp.create_model("model_1")
model_2 = exp.create_model("model_2")

# set instance variable in model_2
model_2.depends_on(model)

then when the script goes to run model_2, we will do a controller check on the status of the previous job. If the job isn't there (wasn't run) or failed, then model_2 will not launch.

Spartee avatar Oct 12 '21 23:10 Spartee

Tagging #249 in this issue because the solution #249 might address this issue.

mellis13 avatar Feb 22 '23 22:02 mellis13