arthurai.core.inferences.add_inference_metadata_to_dataframe#

arthurai.core.inferences.add_inference_metadata_to_dataframe(df, model_attributes, ignore_join_errors=False)#

Adds timestamp and/or partner_inference_id fields to the DataFrame.

Parameters
  • df (DataFrame) – DataFrame to add metadata to

  • model_attributes (Collection[ArthurAttribute]) – attributes of the model

  • ignore_join_errors (bool) – if True, allow inference data without partner_inference_id or ground truth data

Return type

DataFrame

Returns

the input DataFrame if no updates are needed, otherwise a shallow copy with the new columns

Raises

UserValueError – if inference data is supplied without partner_inference_id or ground truth data, and ignore_join_errors is False.