Run a recipe from a scenerio
I am writing a recipe to retrain a custom model created in a Python recipe. This recipe creates a pickle file that contains the model, which is then read by a downstream model that performs predictions. I know how to build a dataset from a scenario, but a pickle file is not a dataset. How can I force the recipe that creates the model to run? Thanks.
Operating system used: Mac Ventura
Best Answer
-
Marlan Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Dataiku Frontrunner Awards 2021 Participant, Neuron 2023 Posts: 320 Neuron
Hi @Erlebacher
,Our approach in this situation is to write the pickle file to a DSS Folder and then build the Folder (which is one of the Build options).
Marlan
Answers
-
Hi @Erlebacher
,Scenarios can also build models. If you add a "Build / Train" step to your scenario, there will be an option to choose a model to build:
This should run the recipe that creates the model.
Be sure to set the Build mode to "Build only this dataset" or "Force-rebuild dataset and dependencies" if you want the model to be built every time the scenario is run.
Thanks,
Zach
-
Hi @ZachM
,When you say `model`, are you referring to a model as defined by Dataiku, created through the lab interface? I simply have a Python recipe that creates a model that is saved in a pickle file. I solved the problem by creating a Dataset with the contents ('Successful update', along with date/time). I have the scenario clear the data set and run it. This works fine.
-
Hi @Erlebacher
,Sorry, I was talking about a Dataiku model. I didn't realize you were using a Python recipe.
Your solution sounds good!
Thanks,
Zach