Replaces the model artifact for a model.

For more information, see Uploading a Model Artifact.

Input Parameter

Type

Default

Description

project_id

str

None

The unique identifier for the project.

model_id

str

None

A unique identifier for the model.

delete_prod

Optional [bool]

False

If True, published events will also be deleted.

delete_pred

Optional [bool]

True

If True, prediction data will also be deleted.

📘

Info

Note that by default, published events are not deleted. This means if you delete a model and recreate it with the same model ID, your old events will still be available. To delete the old events, ensure that delete_prod is set to True.

PROJECT_ID = 'example_project'
MODEL_ID = 'example_model'

client.delete_model(
    project_id=PROJECT_ID,
    model_id=MODEL_ID,
    delete_prod=True
)