IBM Watson Data & AI - Structured Ideas

This Ideas portal is being closed.  Please enter new idea at

Support replacing model in an existing deployment from python library

Commonly models need to be retrained and redeployed to an existing deployment without endpoint URL or credentials changing - API Docs

  • Dec 14 2018
  • Needs review
Customer Name
Role Summary
  • Attach files
  • Lukasz Cmielowski commented
    December 14, 2018 17:58

    It is already supported in latest version of client library:

    there is a method

        ```def update(self, deployment_uid, name=None, description=None, asynchronous=False, meta_props=None):
                Update model used in deployment to the latest version. The scoring_url remains.
                Name and description change will not work for online deployment.
                For virtual deployments the file will be updated under the same download_url.

                :param deployment_uid:  Deployment UID
                :type deployment_uid: str

                :param name: new name for deployment
                :type name: str

                :param description: new description for deployment
                :type description: str

                :param meta_props: dictionary with parameters used for virtual deployment (Core ML format)
                :type meta_props: dict

                :returns: updated metadata of deployment
                :rtype: dict

                A way you might use me is:

                >>> deployment_details = client.deployments.update(deployment_uid)```


    there is also corresponding method for model update …


        ```def update_model(self, model_uid, content_path=None, meta_props=None):
                Update content of model with new one.

                :param model_uid:  Model UID
                :type model_uid: str
                :param content_path: path to tar.gz with new content of model
                :type content_path: str

                :returns: updated metadata of model
                :rtype: dict

                A way you might use me is:

                >>> model_details = client.repository.update_model_content(model_uid, content_path)

  • Chris Snow commented
    December 14, 2018 17:58

    Thanks Lukasz!