API changes (Watson Machine Learning)

The V4 version of the Watson Machine Learning REST API and Watson Machine Learning Python client library have some significant differences from the v3 version and from the V4 beta version. The V4 library supports a range of new functionality, including deployment spaces and software specifications.

Managing API changes using a version date

Watson Machine Learning REST API now includes a VersionDate parameter that you can use to associate your model, script, or function code with a particular version of the API. This can help you avoid needing to update your code if a new feature is introduced in a later version. For details, see the REST API documentation.

API changes from Cloud Pak for Data versions 3.0 to 3.5

These changes might require that you modify your code to execute successfully on the new release.

See Using Watson Machine Learning in a notebook for links to sample notebooks that demonstrate this new functionality.

Support for new features in V4 API

The following APIs support new features in Watson Machine Learning:

For details, see Watson Machine Learning REST API.

Removal of fields that were deprecated in IBM Cloud Pak for Data 3.0.1

The following fields were deprecated in IBM Cloud Pak for Data 3.0.1. Support has now been discontinued.

Field name or technique Usage Replace with
href referencing a Watson Machine Learning resource in a request payload id
assets array querying a space assets API
project and space resoure references request payloads project_id and space_id string fields
name, description,
space_id, tags
response body moved to metadata
tags are now an array of strings
parent metadata parent_id string field
training_lib in Models resource model_definition
training_lib in Experiments resource
(training_references[].training_lib)
model_definition
training_lib_href in Pipelines resource
(document.pipelines[].nodes[].parameters.training_lib_href)
model_definition
href reference a deployment in jobs_entity_request id
Get all spaces using /v4/spaces load all assets for each space use specific APIs for getting assets

Changes from the V4 Python client beta

Note these changes from the beta version of the V4 Python client to the generally available version.

Description Beta python client package usage New python client package usage
Package to install !pip install watson-machine-learning-client-V4 !pip install ibm-watson-machine-learning
Import statement from watson_machine_learning_client import WatsonMachineLearningAPIClient ‘from ibm_watson_machine_learning import APIClient`
Client instance creation statement client = WatsonMachineLearningAPIClient(wml_credentials) client = APIClient(wml_credentials)
Package versions Package version 1.0.99 or higher (Latest version is 1.0.115) Use version 1.0.9 or higher
Documentation https://wml-api-pyclient-dev-v4.mybluemix.net/ http://ibm-wml-api-pyclient.mybluemix.net