Updating model artifacts
This document explains how to update a model artifact in Fiddler using the client.update_model_artifact
function, allowing you to replace a surrogate model or your own uploaded model.
If you need to update a model artifact already uploaded in Fiddler, you can use the update_artifact() function. This allows you to replace a surrogate model or your own uploaded model.
Once you have prepared the model artifacts directory, you can update your model
## "Create the Model"
PROJECT_ID = 'example_project'
MODEL_NAME = 'example_model'
DATASET_FILE_PATH = "Where dataset is available for the model"
MODEL_ARTIFACTS_DIR = 'path where model artefacts are put'
model = fdl.Model.from_data(
source=DATASET_FILE_PATH,
name=MODEL_NAME,
project_id=project.id,
spec=model_spec,
task=fdl.ModelTask.BINARY_CLASSIFICATION,
task_params=task_params,
xai_params=xai_params,
)
Update the artifact
job = model.update_artifact(
model_dir=MODEL_DIR,
)
job.wait()
Updated 8 days ago