add_metrics
Adds or updates metrics for a model in the model registry.
Include metrics with the model
Include metrics with the models when adding them to the registry with mb.add_model and mb.add_models.
Parameters
mb.add_metrics(name=, metrics=, ...)
name
:str
The name of the model in the registry.metrics
:Dict[str, Any]
The metrics to associate with this model. Metrics must be JSON-serializable withstr
values for keys.update
:Optional[merge|overwrite]
Choose whether tomerge
the supplied metrics with any metrics already exist, oroverwrite
the current metrics with what's supplied in this call. Default ismerge
.
Returns
No value is returned. A success status message is printed if the command is successful.
Examples
Adding metrics to a model
This will add precision
and recall
metrics to example_model
.
mb.add_metrics("example_model", metrics={ "precision": 0.95, "recall": 0.81 })
Overwriting a model's metrics
After this call, the only metrics associated with example_model
will be precision
.
mb.add_metrics("example_model", metrics={ "precision": 0.90 }, update="overwrite")