Skip to content

fix(train): stop EvaluationPipelineExecution.wait() on a Stopped execution - #6437

Open
AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/evaluation-wait-stopped
Open

AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/evaluation-wait-stopped

Conversation

@AkshayShah03

Copy link
Copy Markdown

Issue #, if available: N/A

Description of changes:

EvaluationPipelineExecution.wait() returns on the target status and raises on statuses containing "failed", but doesn't treat Stopped as terminal:

  • with the default timeout=None, waiting on a stopped evaluation polls forever, whether it was stopped with execution.stop() or from the console;
  • with a timeout, it eventually raises TimeoutExceededError saying the job is still running.

This change raises FailedStatusError for Stopped, unless Stopped is the target status. It does this in both the Jupyter and the terminal branches, as common_utils/trainer_wait.py already does for stopped training jobs. #6423 is the equivalent fix for PipelineExecution.wait() in sagemaker-mlops.

Testing:

  • New test_wait_stops_on_stopped_status, where time.sleep raises if wait() keeps polling. It fails before this change, and also checks that wait(target_status="Stopped") returns.
  • tests/unit/train/evaluate: no new failures. The 2 MTRL handshake tests also fail on master.

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

…ution

wait() returned on the target status and raised on statuses containing
'failed', but did not treat Stopped as terminal. With the default
timeout=None, waiting on a stopped evaluation (execution.stop() or a stop
from the console) polled forever; with a timeout it eventually raised
TimeoutExceededError saying the job is still running.

Raise FailedStatusError for Stopped (unless it is the target status), in
both the Jupyter and the terminal branches, as trainer_wait already does
for Stopped training jobs.

This branch is waiting to be deployed

1 waiting deployment
manual-approval — 89884248 Waiting Oct 12, 2026 by AkshayShah03 via wait-for-approval #621
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