diff --git a/assets/model_monitoring/components/generation_safety_quality/generation_safety_quality_signal_monitor/spec.yaml b/assets/model_monitoring/components/generation_safety_quality/generation_safety_quality_signal_monitor/spec.yaml index cfd0d2228e..2b38ebfc96 100644 --- a/assets/model_monitoring/components/generation_safety_quality/generation_safety_quality_signal_monitor/spec.yaml +++ b/assets/model_monitoring/components/generation_safety_quality/generation_safety_quality_signal_monitor/spec.yaml @@ -4,7 +4,7 @@ type: pipeline name: generation_safety_quality_signal_monitor display_name: Generation Safety & Quality - Signal Monitor description: Computes the content generation safety metrics over LLM outputs. -version: 0.4.3 +version: 0.4.4 is_deterministic: true inputs: monitor_name: @@ -158,7 +158,7 @@ jobs: type: aml_token output_signal_metrics: type: spark - component: azureml://registries/azureml/components/model_monitor_metric_outputter/versions/0.3.10 + component: azureml://registries/azureml/components/model_monitor_metric_outputter/versions/0.3.11 inputs: signal_metrics: type: mltable diff --git a/assets/model_monitoring/components/model_monitor/model_monitor_metric_outputter/spec.yaml b/assets/model_monitoring/components/model_monitor/model_monitor_metric_outputter/spec.yaml index 8aa7642865..0c614a1409 100644 --- a/assets/model_monitoring/components/model_monitor/model_monitor_metric_outputter/spec.yaml +++ b/assets/model_monitoring/components/model_monitor/model_monitor_metric_outputter/spec.yaml @@ -4,7 +4,7 @@ type: spark name: model_monitor_metric_outputter display_name: Model Monitor - Metric Outputter description: Output the computed model monitor metrics. -version: 0.3.10 +version: 0.3.11 is_deterministic: true code: ../../src/ diff --git a/assets/model_monitoring/components/src/model_monitor_metric_outputter/run.py b/assets/model_monitoring/components/src/model_monitor_metric_outputter/run.py index 43447ac25b..c9d693163f 100644 --- a/assets/model_monitoring/components/src/model_monitor_metric_outputter/run.py +++ b/assets/model_monitoring/components/src/model_monitor_metric_outputter/run.py @@ -59,18 +59,20 @@ def run(): ).get_metrics_dict() samples_index: List[Row] = None + samples_index_df = None if args_dict["samples_index"]: - print("Processing samples index.") - samples_index_df = try_read_mltable_in_spark( - args.samples_index, "samples_index" - ) - if not samples_index_df: - print("Samples index is empty. Skipping processing of the samples index.") - else: - samples_index: List[Row] = samples_index_df.collect() - result = merge_dicts( - result, SamplesOutputBuilder(samples_index).get_samples_dict() + try: + print("Processing samples index.") + samples_index_df = try_read_mltable_in_spark( + args.samples_index, "samples_index" ) + if samples_index_df is not None: + samples_index: List[Row] = samples_index_df.collect() + result = merge_dicts( + result, SamplesOutputBuilder(samples_index).get_samples_dict() + ) + except Exception as e: + print(f"Samples index is empty. Skipping processing of the samples index. {e}") output_payload = to_output_payload(args.signal_name, args.signal_type, result)