vetiver.pin_metrics#

vetiver.pin_metrics(board, df_metrics: pandas.core.frame.DataFrame, metrics_pin_name: str, pin_type: str | None = None, index_name: str = 'index', overwrite: bool = False) pandas.core.frame.DataFrame#

Update an existing pin storing model metrics over time

Parameters
  • board – Pins board

  • df_metrics (pd.DataFrame) – Dataframe of metrics over time, such as created by vetiver_compute_metrics()

  • metrics_pin_name – Pin name for where the metrics are stored

  • index_name – The column in df_metrics containing the aggregated dates or datetimes. Note that this defaults to a column named “index”.

  • overwrite (bool) – If TRUE (the default), overwrite any metrics for dates that exist both in the existing pin and new metrics with the new values. If FALSE, error when the new metrics contain overlapping dates with the existing pin.