client.update_model

Replaces the model artifact for a model.

For more information, see Uploading a Model Artifact.

🚧

Warning

This function does not allow for changes in a model's schema. The inputs and outputs to the model must remain the same.

Input ParameterTypeDefaultDescription
project_idstrNoneThe unique identifier for the project.
model_idstrNoneA unique identifier for the model.
model_dirpathlib.PathNoneA path to the directory containing all of the model files needed to run the model.
force_pre_computeboolTrueIf True, re-run precomputation steps for the model. This can also be done manually by calling client.trigger_pre_computation.
import pathlib

PROJECT_ID = 'example_project'
MODEL_ID = 'example_model'

model_dir = pathlib.Path('model_dir')

client.update_model(
    project_id=PROJECT_ID,
    model_id=MODEL_ID,
    model_dir=model_dir
)
Return TypeDescription
boolA boolean denoting whether the update was successful.
True