Hello! In GitLab CI/CD, we have the option of man...
# ask-community
e
Hello! In GitLab CI/CD, we have the option of manually trigger a job if a previous one succeeded (
needs
) and we set
when
to manual. Is there a similar workflow in Dagster for
ops
inside a job? My use case is to train a model and output/log some validation results and choose to manually trigger an
op
to deploy the model. This is a compliance requirement. Both
ops
are called from the same
job
. The alternative would be load the output of an
op
in
train_job
in an
op
called from
deploy_job
. Is this possible? Using I/O managers maybe? Any other suggestions?
c
Hi Eduardo. You could do this using the second approach you mentioned--you could have a downstream
deploy_job
with an op that has an unconnected input (https://docs.dagster.io/concepts/io-management/unconnected-inputs#providing-an-input-manager-for-an-unconnected-input) that reads from the ML model.
Though, have you considered using assets? If you had an upstream
train_model
asset and a downstream
deploy_model
asset, then in the UI or within a schedule/sensor you can kick off the
deploy_model
asset whenever desired. This would then automatically read from the latest persisted output for
train_model
.
e
Unfortunately moving to assets would entail a big refactoring, which I don't have time right now 🙁 I ended up writing what I needed to a db But I will have a look at those unconnected Inputs, thanks for the tip!