Updating Model Artifacts

If you need to update an existing model artifact or model surrogate in Fiddler, you can use the update_artifact() or update_surrogate() functions. These functions allow you to replace existing model surrogates or your own uploaded model artifacts as needed.

Update an existing model artifact

Once you have prepared the model artifacts directory, you can update your model.

PROJECT_NAME = 'YOUR_PROJECT_NAME'
MODEL_NAME = 'YOUR_MODEL_NAME'

project_id = fdl.Project.from_name(PROJECT_NAME).id
model = fdl.Model.from_name(name=MODEL_NAME, project_id=project_id)

job = model.update_artifact(
    model_dir=MODEL_DIR,
)
job.wait()

Update an existing model surrogate

One reason to update an existing surrogate is if you wish to use an updated baseline dataset from the one used originally. Fiddler will use this updated dataset when creating the model surrogate

PROJECT_NAME = 'YOUR_PROJECT_NAME'
MODEL_NAME = 'YOUR_MODEL_NAME'
DATASET_NAME = 'YOUR_UPDATED_DATASET_NAME'

project_id = fdl.Project.from_name(PROJECT_NAME).id
model = fdl.Model.from_name(name=MODEL_NAME, project_id=project_id)
dataset = fdl.Dataset.from_name(name=DATASET_NAME, model_id=model.id)

model.update_surrogate(
  dataset_id=dataset.id
)

Last updated

© 2024 Fiddler AI