Skip to content

fix(core): build a v3 ProcessingOutput in ModelMonitor._normalize_processing_output - #6422

Open
AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/model-monitor-normalize-processing-output
Open

AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/model-monitor-normalize-processing-output

Conversation

@AkshayShah03

Copy link
Copy Markdown

Issue #, if available: N/A

Description of changes:

ModelMonitor.run_baseline(baseline_inputs, output=<str>) normalizes a string output through _normalize_processing_output. That method still builds the output with the v2 signature:

output = ProcessingOutput(source=output, destination=s3_uri, output_name=_DEFAULT_OUTPUT_NAME)

The v3 ProcessingOutput shape has no source or destination fields (extra="forbid"). Every run_baseline call with a string output therefore raises:

ValidationError: 2 validation errors for ProcessingOutput
source
  Extra inputs are not permitted

This change builds the output with output_name and an s3_output=ProcessingS3Output(s3_uri=..., local_path=..., s3_upload_mode="EndOfJob"), the same way _normalize_baseline_output right above it does. The v2 meaning is unchanged: the string is the container path, and the S3 destination is generated.

Testing:

  • New test_normalize_processing_output_from_local_path. It fails before this change.
  • tests/unit/test_model_monitoring.py and tests/unit/model_monitor: 90 passed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…cessing_output

ModelMonitor.run_baseline(output=<str>) normalizes the string through
_normalize_processing_output, which still built the output with the v2
ProcessingOutput(source=..., destination=...) signature. The v3
ProcessingOutput shape has no such fields (extra='forbid'), so every
run_baseline call with a string output raised a pydantic ValidationError.

Build it with output_name and an s3_output (ProcessingS3Output) instead,
keeping the v2 meaning: the string is the container path and the S3
destination is generated.

This branch had an error being deployed

1 failed deployment
manual-approval — 0bcba2f8 Deployed Oct 10, 2026 by AkshayShah03 via wait-for-approval #1974
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant