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

simond
simond Registered Posts: 3 ✭✭✭
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!

Answers

  • simond
    simond Registered Posts: 3 ✭✭✭

    After rereading this question, the last paragraph is a bit unclear so my apologies for that. To make it a bit more clear: I would like to revert the settings of a specific visual analysis back to the settings of session 1. This needs to be done using the api for our usecase, therefore this question.

    Kind regards

Setup Info
    Tags
      Help me…