Skip to content

Commit 6e5a794

Browse files
author
Chuyang Deng
committed
fix: set logs to False if wait is False
1 parent 69d06ad commit 6e5a794

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/sagemaker/automl/automl.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,13 @@ def fit(self, inputs=None, wait=True, logs=True, job_name=None):
7878
is stored. Or an AutoMLInput object. If a local path is provided, the dataset will
7979
be uploaded to an S3 location.
8080
wait (bool): Whether the call should wait until the job completes (default: True).
81-
logs (bool): Whether to show the logs produced by the job.
82-
Only meaningful when wait is True (default: True).
81+
logs (bool): Whether to show the logs produced by the job. Only meaningful when wait
82+
is True (default: True). if `wait` is False, `log` will be set to False as well.
8383
job_name (str): Training job name. If not specified, the estimator generates
8484
a default job name, based on the training image name and current timestamp.
8585
"""
86-
if logs and not wait:
87-
raise ValueError(
88-
"""Logs can only be shown if wait is set to True.
89-
Please either set wait to True or set logs to False."""
90-
)
86+
if not wait:
87+
logs = False
9188

9289
# upload data for users if provided local path
9390
# validations are done in _Job._format_inputs_to_input_config

0 commit comments

Comments
 (0)