Uploading Model Artifacts

Before uploading your model artifact into Fiddler, you need to add the model with model.create method.

Once you have prepared the model artifacts directory, you can upload 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.add_artifact(
    model_dir=MODEL_DIR,
)
job.wait()

Last updated

© 2024 Fiddler AI