Skip to main content
PATCH
https://sandbox.getcollate.io/api
/
v1
/
mlmodels
/
{id}
PATCH /v1/mlmodels/{id}
from metadata.sdk import configure
from metadata.sdk.entities import MLModels

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# Retrieve, modify, and update
model = MLModels.retrieve("6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2")
model.description = "Updated: Customer segmentation using KMeans with 5 clusters"
model.mlHyperParameters = [
    {"name": "n_clusters", "value": "7"},
    {"name": "max_iter", "value": "500"}
]
updated = MLModels.update(model)

print(f"Updated to version {updated.version}")
{
  "id": "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2",
  "name": "customer_segmentation",
  "fullyQualifiedName": "mlflow_svc.customer_segmentation",
  "displayName": "Customer Segmentation Model",
  "description": "Updated: Customer segmentation using KMeans with 5 clusters",
  "algorithm": "KMeans",
  "version": 0.2,
  "updatedAt": 1769982669247,
  "updatedBy": "admin",
  "service": {
    "id": "ca22d46e-81b9-4e48-85b5-0adc44980da9",
    "type": "mlmodelService",
    "name": "mlflow_svc",
    "fullyQualifiedName": "mlflow_svc",
    "deleted": false
  },
  "serviceType": "Mlflow",
  "href": "http://localhost:8585/api/v1/mlmodels/6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2",
  "deleted": false,
  "owners": [],
  "tags": [],
  "followers": [],
  "votes": {
    "upVotes": 0,
    "downVotes": 0
  },
  "domains": []
}

Update an ML Model

Update an ML model’s properties using JSON Merge Patch. You can update by ID or by fully qualified name.

Update by ID

id
string
required
UUID of the ML model to update.

Update by Name

Use PATCH /v1/mlmodels/name/{fqn} to update by fully qualified name.
fqn
string
required
Fully qualified name of the ML model (e.g., mlflow_svc.customer_segmentation).

Body Parameters

Send a JSON object with the fields to update. Only provided fields are changed.
description
string
Updated description in Markdown format.
displayName
string
Updated display name.
algorithm
string
Updated algorithm name.
mlFeatures
array
Updated list of ML features.
mlHyperParameters
array
Updated list of hyperparameters.
target
string
Updated target variable.
owners
array
Updated list of owner references.
tags
array
Updated classification tags.
domain
string
Updated domain FQN.
extension
object
Updated custom property values.
PATCH /v1/mlmodels/{id}
from metadata.sdk import configure
from metadata.sdk.entities import MLModels

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# Retrieve, modify, and update
model = MLModels.retrieve("6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2")
model.description = "Updated: Customer segmentation using KMeans with 5 clusters"
model.mlHyperParameters = [
    {"name": "n_clusters", "value": "7"},
    {"name": "max_iter", "value": "500"}
]
updated = MLModels.update(model)

print(f"Updated to version {updated.version}")
{
  "id": "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2",
  "name": "customer_segmentation",
  "fullyQualifiedName": "mlflow_svc.customer_segmentation",
  "displayName": "Customer Segmentation Model",
  "description": "Updated: Customer segmentation using KMeans with 5 clusters",
  "algorithm": "KMeans",
  "version": 0.2,
  "updatedAt": 1769982669247,
  "updatedBy": "admin",
  "service": {
    "id": "ca22d46e-81b9-4e48-85b5-0adc44980da9",
    "type": "mlmodelService",
    "name": "mlflow_svc",
    "fullyQualifiedName": "mlflow_svc",
    "deleted": false
  },
  "serviceType": "Mlflow",
  "href": "http://localhost:8585/api/v1/mlmodels/6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2",
  "deleted": false,
  "owners": [],
  "tags": [],
  "followers": [],
  "votes": {
    "upVotes": 0,
    "downVotes": 0
  },
  "domains": []
}

Returns

Returns the updated ML model object with the new version number.

Response

id
string
Unique identifier for the ML model (UUID format).
name
string
ML model name.
fullyQualifiedName
string
Fully qualified name in format service.modelName.
description
string
Updated description.
version
number
Incremented version number.

Error Handling

CodeError TypeDescription
400BAD_REQUESTInvalid JSON patch or malformed request
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to update this ML model
404NOT_FOUNDML model with given ID or FQN does not exist
409CONFLICTConcurrent modification detected