Repository navigation
fix(model-monitor): honor base_job_name for job definition names - #6373
Merged
rsareddy0329 merged 1 commit intoOct 5, 2026
Merged
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. Also make the four *_update_failure tests deterministic: they asserted the regenerated job definition name differs from the original, which relied on two name_from_base calls landing in different milliseconds (flaky on master). Patch name_from_base with a counter-based unique name in those tests. Note: the recurring execution processing job names are assigned by the SageMaker service and remain non-customizable. Relates-to aws#4783
jam-jee
approved these changes
Oct 5, 2026
jam-jee
approved these changes
Oct 5, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
This is the V2 (
master-v2) counterpart of the V3 change in #6372.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.
*_update_failuretests, which asserted the regenerated jobdefinition name differs from the original — that relied on two
name_from_basecallslanding in different milliseconds and is flaky on
master-v2. They now patchname_from_basewith a counter-based unique name (verified deterministic across repeatedruns).
monitor/unit suites pass (57 passed).flake8andblack -l 100clean onchanged files.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.