Hello Kedro Team, I am currently working on a pip...
# questions
a
Hello Kedro Team, I am currently working on a pipeline that trains a model, and I'm employing versioning for the said model. In the subsequent steps of the pipeline, I would like to use a specific version of the model to make predictions. However, it seems that the Kedro node input doesn't support the use of versions. Below is the snippet of the problematic code:
Copy code
python
node(
    predict,
    inputs=["classifier_flaml:<version_ideally_from_params>", "X_src"],
    outputs=["y_src_pred", "y_src_pred_proba"],
),
Can you provide guidance on how to accomplish this task? Thank you.
1
d
Not from params, but I think it should solve your problem (unless you need multiple versions of a model): https://docs.kedro.org/en/stable/development/commands_reference.html Search for
kedro run --load-versions
a
Indeed, I need 2 versions, one is fixed "the best model" the other one is the latest for the current model. The CLI option is not an option :)
n
What if you defined them as two datasets? TRAINED_MODEL and BEST_MODEL
a
Thank you for the sugestion - sounds reasonable. Although it is still a bit workaround. For instance i would still need to keep updating it for the latest version, for the fixed one this could a solutionx
n
By default it always fetch the latest version unless you specified, you shouldn’t need to update it. In fact you need to maintain what is the best model anyway, so it makes sense to maintain it as a separate catalog entry.
a
You are right, thank you!
K 1