fix(model-monitor): honor base_job_name for job definition names - #6372
rsareddy0329 wants to merge 3 commits into
Conversation
ModelMonitor subclasses generated the monitoring job definition name from the type's JOB_DEFINITION_BASE_NAME constant, ignoring a user-supplied base_job_name -- even though the monitoring schedule name already honors it. As a result base_job_name was silently dropped for the job definition (and the monitoring resources derived from it). Add a _generate_job_definition_name() helper on the ModelMonitor base (mirroring _generate_monitoring_schedule_name) that uses base_job_name when provided and falls back to JOB_DEFINITION_BASE_NAME otherwise, and use it in the data-quality, model-quality, model-bias and model-explainability create and update paths. Note: the recurring execution processing job names are assigned by the SageMaker service and remain non-customizable. Relates-to aws#4783
|
Claude finished @rsareddy0329's task in 1m 26s —— View job Review: PR #6372 — honor
|
|
Claude finished @rsareddy0329's task in 55s —— View job Review: PR #6372 — honor
|
|
Claude finished @rsareddy0329's task in 48s —— View job Review: PR #6372 — honor
|
Issue #, if available: Relates to #4783
Description of changes:
ModelMonitorsubclasses generated the monitoring job definition name from thetype's
JOB_DEFINITION_BASE_NAMEconstant, ignoring a user-suppliedbase_job_name—even though the monitoring schedule name already honors it. So
base_job_namewassilently dropped for the job definition and the monitoring resources derived from it,
which is what #4783 reports.
Add a
_generate_job_definition_name()helper on theModelMonitorbase (mirroring theexisting
_generate_monitoring_schedule_name/_generate_baselining_job_namehelpers)that uses
base_job_namewhen provided and falls back toJOB_DEFINITION_BASE_NAMEotherwise. It's used in the create and update paths of the data-quality, model-quality,
model-bias and model-explainability monitors.
Scope note: the recurring execution processing-job names are assigned by the SageMaker
service (
CreateMonitoringScheduleexposes no field to name them), so those remainnon-customizable. This change makes
base_job_nameflow into every monitoring name theSDK does control (schedule + job definition).
Testing:
_generate_job_definition_name()usesbase_job_namewhen set andfalls back to the type default otherwise.
test_model_monitoring.py+model_monitor/suites pass (82 passed, 1 skipped;clarify monitors 20 passed).
flake8andblackclean on changed files.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.