Skip to content

Commit b42fec5

Browse files
authored
Remove hardcoded 'training' in error message for checking job status (#474)
1 parent a2fdf5b commit b42fec5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ CHANGELOG
1313
* build: added pylint
1414
* build: upgrade docker-compose to 1.23
1515
* enhancement: Frameworks: update warning for not setting framework_version as we aren't planning a breaking change anymore
16+
* enhancement: Session: remove hardcoded 'training' from job status error message
1617

1718
1.14.1
1819
======

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)