Periodic Workflows (Scheduling)
Many workflows, such as periodic model training, need to run on a schedule (for example, hourly or daily). ML Applications makes this easy by integrating with OCI Data Science Scheduler. You can define a schedule that triggers an ML Application trigger at specified intervals.
To schedule a workflow, use the Data Science Scheduler as an
instance component and configure the schedule action to invoke an ML Applications Trigger, as
follows:
# For illustration purposes, details omitted
resource "oci_datascience_schedule" "periodic_training" {
action {
action_details {
# The workflow (trigger) to be started periodically
http_action_type = "INVOKE_ML_APPLICATION_PROVIDER_TRIGGER"
ml_application_instance_view_id = var.app_instance.view_id
trigger_ml_application_instance_view_flow_details {
trigger_name = "TrainingTrigger"
}
}
action_type = "HTTP"
}
...
trigger {
trigger_type = "INTERVAL"
frequency = "HOURLY"
interval = 1
}
...
}
This simplified example ensures the TrainingTrigger
runs automatically every
hour. Adjust the frequency
and interval
settings to match
your scheduling needs. The complete code for this example is available in schedule.tf
For more details on Data Science Scheduler, see the Scheduler chapter.