diff --git a/src/sagemaker/session.py b/src/sagemaker/session.py index a0cb7a29bf..76d1ad05d1 100644 --- a/src/sagemaker/session.py +++ b/src/sagemaker/session.py @@ -3121,7 +3121,13 @@ def _check_job_status(self, job, desc, status_key_name): # If the status is capital case, then convert it to Camel case status = _STATUS_CODE_TABLE.get(status, status) - if status not in ("Completed", "Stopped"): + if status == "Stopped": + LOGGER.warning( + "Job ended with status 'Stopped' rather than 'Completed'. " + "This could mean the job timed out or stopped early for some other reason: " + "Consider checking whether it completed as you expect." + ) + elif status != "Completed": reason = desc.get("FailureReason", "(No reason provided)") job_type = status_key_name.replace("JobStatus", " job") raise exceptions.UnexpectedStatusException(