Using the dataiku API to reverse the design of a ML Task

simond
simond Registered Posts: 2 ✭✭✭
edited October 17 in Using Dataiku

lo,

For a specific case we would like to use the Dataiku API to revert the design of a visual analysis to a design which was used for a specific model. E.g. we have three sessions, the last trained session (session 3) had a different design then session 1.

I would like to revert the design back to session 1 and this is possible in the GUI with the following button:

However, I would like to do this using the dataiku API while I need the settings to be copied to a different visual analysis. The analysis ID is kNAgInod, the Task ID is DCcgyWRW and the specific model ID for the XGboost in session 1 is A-TestAH-kNAgInod-DCcgyWRW-s1-pp1-m1. However, using the following code still obtains the settings of Session 2.

import dataikuapi
import dataiku

client = dataiku.api_client()

task = dataikuapi.dss.ml.DSSMLTask.from_full_model_id(client, 'A-TestAH-kNAgInod-DCcgyWRW-s2-pp1-m1')

Using a different method also did not work:

import dataikuapi
import dataiku


client = dataiku.api_client()

ml_task = project.get_ml_task('kNAgInod','DCcgyWRW').from_full_model_id(client, 'A-TestAH-kNAgInod-DCcgyWRW-s2-pp1-m1')

I did the check whether both methods worked using:

import dataiku
from dataiku import pandasutils as pdu
import pandas as pd
import dataikuapi client = dataiku.api_client() task = dataikuapi.dss.ml.DSSMLTask.from_full_model_id(client, 'A-TestAH-kNAgInod-DCcgyWRW-s2-pp1-m1') task.get_settings().get_enabled_algorithm_names() # Should only show one algorithm while that's the design of session 1

Is there a way to obtain the settings of a previous setting and reverting to these settings, so that it is possible to obtain the settings using get_settings()?

Thanks in advance!

Setup Info
    Tags
      Help me…