v1

latestOpenAPI 3.0.02026-08-061473373.5 KB
Manage classifications models

Update classifications model

Overwrites the training data associated with this custom classifications model and retrains the model. The new model replaces the current deployment.

put/v1/models/classifications/{model_id}

Response

Model overwrite successful

namestring

An optional name for the model

user_metadataobject

An optional map of metadata key-value pairs to store with this model

languagestring required

The 2-letter language code of this model

descriptionstring

An optional description of the model

model_versionstring

An optional version string

versionstring

Deprecated — use model_version

workspace_idstring nullable

ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding

version_descriptionstring nullable

The description of the version

featuresstring[]

The service features that are supported by the custom model

status'starting' | 'training' | 'deploying' | 'available' | 'error' | 'deleted' required

When the status is available, the model is ready to use

model_idstring required

Unique model ID

createdstring date-time required

dateTime indicating when the model was created

last_trainedstring date-time

dateTime of last successful model training

last_deployedstring date-time

dateTime of last successful model deployment

Example response

{
  "user_metadata": {
    "region": "North America",
    "latest": true
  },
  "notices": [
    {
      "message": "Training data validation failed: Too few examples for label insufficient_examples. Minimum of 5 required"
    },
    {
      "message": "Not enough examples for class 'foo'. 4 were given but 5 are required."
    },
    {
      "message": "Duplicate label given in example 27: {'foo', 'bar', 'foo'}"
    }
  ]
}