SmartSim
SmartSim copied to clipboard
Job dependance feature
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.
Tagging #249 in this issue because the solution #249 might address this issue.