Scenario custom trigger with a projet variable

Grixis
Grixis PartnerApplicant, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 80 ✭✭✭✭✭

Grixis_0-1588612345136.png


I have some scenarios building some train models and generating a metric with the RMSE and i would like to launch a second scenario to builde the prediction if RMSE generate by the last scenario is good. (to launch the predictions) I don't find anything corresponding to my problem on the helpers, the only part that comes close is the png part. I thought it would be a trigger like this:

from dataiku.scenario import Trigger

t = Trigger()

if True: ${RMSE}>4 # your condition here

t.fire()

With ${RMSE} the project variable that would change based on the last RMSE obtained from the train's output table?
Is this kind of thing possible on Dataiku in a simple way?

Thanks.

Answers

  • Jediv
    Jediv Dataiker Posts: 17 Dataiker
    edited July 17

    Hi,

    If we assume that we have a project-level variable called rmse, then we could create a trigger like this to fire off a scenario when that variable is above a number (in this case 4):

    import dataiku
    from dataiku.scenario import Trigger
    
    c_vars = dataiku.get_custom_variables()
    t = Trigger()
    
    if float(c_vars['rmse']) > 4: 
        t.fire()

  • Grixis
    Grixis PartnerApplicant, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 80 ✭✭✭✭✭

    Thanks for you response.

    What I'm looking for is for my project variable RMSE to be equal to the last calculated metric by the first scenario.

Setup Info
    Tags
      Help me…