Skip to content

fix: set logs to False if wait is False #1585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 17, 2020
11 changes: 4 additions & 7 deletions src/sagemaker/automl/automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,13 @@ def fit(self, inputs=None, wait=True, logs=True, job_name=None):
is stored. Or an AutoMLInput object. If a local path is provided, the dataset will
be uploaded to an S3 location.
wait (bool): Whether the call should wait until the job completes (default: True).
logs (bool): Whether to show the logs produced by the job.
Only meaningful when wait is True (default: True).
logs (bool): Whether to show the logs produced by the job. Only meaningful when wait
is True (default: True). if `wait` is False, `log` will be set to False as well.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: logs missing s
if wait is False, log**s** will be set to False as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! updated!

job_name (str): Training job name. If not specified, the estimator generates
a default job name, based on the training image name and current timestamp.
"""
if logs and not wait:
raise ValueError(
"""Logs can only be shown if wait is set to True.
Please either set wait to True or set logs to False."""
)
if not wait:
logs = False

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