Replicate · Arazzo Workflow
Replicate Run a Prediction with Bounded Wait and Cancel
Version 1.0.0
Create a prediction, poll a bounded number of times, and cancel it if it has not finished.
View Spec
View on GitHub
Artificial IntelligenceMachine LearningImage GenerationLanguage ModelsModel DeploymentArazzoWorkflows
Provider
Workflows
predict-with-timeout-cancel
Create a prediction, poll within a bounded budget, and cancel it if still running.
Submits a prediction, polls it a limited number of times, and on exhausting the poll budget while still starting or processing, cancels the prediction and reports the canceled state.
1
createPrediction
predictions.create
Create a prediction for the supplied model version and input.
2
getPrediction
predictions.get
Retrieve the prediction state, retrying a bounded number of times. If the budget is exhausted while still running, control falls through to the cancel step.
3
cancelPrediction
predictions.cancel
Cancel the prediction because it did not finish within the bounded poll budget, stopping further compute usage.