Sorry, age-old question: what are ways (from simpl...
# ask-metaflow
l
Sorry, age-old question: what are ways (from simple to super complex) that we can sync model dependencies between a
TrainFlow
and
PredictFlow
? The
TrainFlow
runs a bunch of times, saving a model each time. Then in `PredictFlow`we choose a run_id from
TrainFlow
--> that model gets loaded up and used for inference. Putting some examples in the thread...
đź‘€ 1
v
@lively-lunch-9285 can you share examples here? Happy to follow up then 🙂
🤣 1
l
Got pulled away. And am now again. 🤦 I'll add them! Briefly: is there a way we can grab the fast-bakery image from
TrainFlow.train
using a run id, and dynamically have
PredictFlow.predict
use it? The idea being: you'd pass a run ID to
PredictFlow
as a parameter.
đź‘€ 1
Alright, here’s an attempt to make as trivial and concise an example as possible:
message has been deleted
Is there a way I could change that predict flow so that the @pypi_base decorator doesn’t declare a pinned version of sklearn—but instead uses the same image that was used in the training step? This is a similar idea to MLflow’s models from code packaging format. MLflow records the requirements of a model—whichever are needed for inference. I’d keep the signature/contract/inputs-outputs of model.predict() the same across model versions—but I might swap out the underlying library versions in the Train flow—even the whole framework (e.g. switch from PyTorch to sklearn). And I’d want the predict flow not to require redeployment to accommodate rolling back or forward to the model version trained during any of the run_ids of TrainFlow
âž• 1
cc: @rich-scientist-42991