Renaming a saved model using Dataiku Python API

ankit_sikka
ankit_sikka Registered Posts: 6

How to rename a saved model using API?

Tagged:

Best Answer

  • LouisDHulst
    LouisDHulst Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Neuron, Registered, Neuron 2023 Posts: 54 Neuron
    edited September 3 Answer ✓

    Hi @ankit_sikka ,
    
    This should work:
    
    client = dataiku.api_client()
    project = client.get_default_project()
    
    model = project.get_saved_model("model_id")
    settings = model.get_settings()
    raw_settings = settings.get_raw()
    
    raw_settings["name"] = 'new_name'
    
    settings.save()
    

    Doc here.

Setup Info
    Tags
      Help me…