Registering a Model¶
To register a model without uploading your model artifact, you can use the
client.register_model API. Let's walk through a simple example of how this can be done.
PROJECT_ID = 'example_project' DATASET_ID = 'example_dataset' dataset_info = client.get_dataset_info( project_id=PROJECT_ID, dataset_id=DATASET_ID )
Although the data has been uploaded to Fiddler, there is still no specification for which columns to use for which purpose.
Creating a ModelInfo object¶
To provide this specification, you can create a
In this case, we’d like to tell Fiddler to use
output_columnas the model output
target_columnas the model's target/ground truth
To save time, Fiddler provides a function to add this specification to an existing
model_task = fdl.ModelTask.BINARY_CLASSIFICATION model_target = 'target_column' model_outputs = ['output_column'] model_features = [ 'feature_1', 'feature_2', 'feature_3' ] model_info = fdl.ModelInfo.from_dataset_info( dataset_info=dataset_info, dataset_id=DATASET_ID, target=model_target, outputs=model_outputs, model_task=model_task )
Registering your model¶
MODEL_ID = 'example_model' client.register_model( project_id=PROJECT_ID, dataset_id=DATASET_ID, model_id=MODEL_ID, model_info=model_info )