MonitoringConfig#

class datarobotx.llm.MonitoringConfig(deployment_id, model_id, inputs_parser=<function default_monitoring_inputs_parser>, output_parser=<function default_monitoring_output_parser>, target='completion')#

Monitoring deployment configuration.

Parameters:
  • deployment_id (str) – DR MLOps deployment id to use when reporting predictions, service health

  • model_id (str) – DR model id to use when reporting predictions, service health

  • inputs_parser (Callable, optional) – Function for mapping the positional and keyword arguments passed to the monitored function to a dictionary; key-value pairs in this resulting dictionary are used as feature names and feature values when reporting prediction data to ML Ops. The values in this dictionary must be of type that is reportable to ML Ops. Default is to report the first positional argument as a feature named ‘prompt’.

  • output_parser (Callable, optional) – Function for mapping the value returned from the monitored function to a dictionary; key-value pairs in this resulting dictionary are reported as additional feature names and features values when reporting prediction data to ML Ops. The values in this dictionary must be of type that is reportable to ML Ops. Default is to associate the return value of the function with the feature ‘completion’

  • target (str, optional) – The name of the feature that will be reported as the target value to ML Ops. Default is ‘completion’. For unstructured custom model deployments set this to None.

Attributes:

deployment_id

model_id

target

Methods:

inputs_parser(**_)

rtype:

Dict[str, Any]

output_parser(**_)

rtype:

Dict[str, Any]