Run a recipe from a scenerio

Options
Erlebacher
Erlebacher Registered Posts: 82 ✭✭

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

Tagged:

Best Answer

  • Marlan
    Marlan Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Dataiku Frontrunner Awards 2021 Participant, Neuron 2023 Posts: 316 Neuron
    Answer ✓
    Options

    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

  • Zach
    Zach Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 153 Dataiker
    Options

    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:

    670319A5-4039-4A1D-B9E9-7D804EB1FBAB_1_201_a.jpeg

    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

  • Erlebacher
    Erlebacher Registered Posts: 82 ✭✭
    Options

    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.

  • Zach
    Zach Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 153 Dataiker
    Options

    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

Setup Info
    Tags
      Help me…