Skip to content

Commit a255859

Browse files
committed
Remove hardcoded 'training' in error message for all job types
1 parent e127797 commit a255859

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sagemaker/session.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,8 @@ def _check_job_status(self, job, desc, status_key_name):
636636

637637
if status != 'Completed' and status != 'Stopped':
638638
reason = desc.get('FailureReason', '(No reason provided)')
639-
raise ValueError('Error training {}: {} Reason: {}'.format(job, status, reason))
639+
job_type = status_key_name.replace('JobStatus', ' job')
640+
raise ValueError('Error for {} {}: {} Reason: {}'.format(job_type, job, status, reason))
640641

641642
def wait_for_endpoint(self, endpoint, poll=5):
642643
"""Wait for an Amazon SageMaker endpoint deployment to complete.

0 commit comments

Comments
 (0)