Skip to content

Commit 7f8e68a

Browse files
authored
Fix: Estimator.logs()
If you call any `Estimator.logs()` either `Pytorch` you will receive the following error ```python ParamValidationError: Parameter validation failed: Invalid type for parameter TrainingJobName, value: <sagemaker.estimator._TrainingJob object at 0x7ffc4af0d520>, type: <class 'sagemaker.estimator._TrainingJob'>, valid types: <class 'str'> ``` adjusted it to `self.latest_training_job.name` and it works
1 parent 3471f9e commit 7f8e68a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sagemaker/estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ def logs(self):
815815
If the output is a tty or a Jupyter cell, it will be color-coded based
816816
on which instance the log entry is from.
817817
"""
818-
self.sagemaker_session.logs_for_job(self.latest_training_job, wait=True)
818+
self.sagemaker_session.logs_for_job(self.latest_training_job.name, wait=True)
819819

820820
def deploy(
821821
self,

0 commit comments

Comments
 (0)