IBM Watson Data & AI - Structured Ideas

Welcome to the idea forum for IBM Watson Data & AI — our team welcomes any feedback, requests, and suggestions you have for improving our products! 

This forum allows us to connect your product improvement ideas with IBM product and engineering teams. 

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

  • Jun 8 2018
  • Needs review
Role Summary
  • Attach files
  • Lukasz Cmielowski commented
    June 8, 2018 07:05

    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
    June 10, 2018 22:17

    Thanks Lukasz!