Adds on to an existing metric set and checks values are formatted correctly.
kf_add_metric(metric_set, name, value, format)
metric_set | Metric set from |
---|---|
name | Name of metric. |
value | Value of metric. Must be numeric. |
format | Format to display metric in Kubeflow. Must be either RAW or PERCENTAGE. |
Metric set
You can repeatedly chain this function to iteratively build up a pipeline metrics output.
# Create ROC AUC and PR AUC output kf_init_metrics() %>% kf_add_metric("roc-auc", .75, "RAW") %>% kf_add_metric("pr-auc", .45, "RAW")#> { #> "metrics": [ #> { #> "name": "roc-auc", #> "numberValue": 0.75, #> "format": "RAW" #> }, #> { #> "name": "pr-auc", #> "numberValue": 0.45, #> "format": "RAW" #> } #> ] #> }