-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
Calling AutoML.fit(..., wait=False) will throw an error, requiring users to explicitly add the logs=False parameter.
The documentation does technically point out that logs defaults to True and that the parameter is "only meaningful when wait is True" - which implies inconsistent combinations would be ignored, rather than triggering error.
The behaviour is inconsistent with other functions e.g. Estimator.fit() where wait=False doesn't require a separate explicit logs configuration. Seems like it's accidental rather than a deliberate choice.
To reproduce
Create a sagemaker.automl.automl.AutoML instance and call .fit() with parameter wait=False and not specifying logs parameter.
Expected behavior
The job starts and the function returns without blocking the kernel. No logs printed because we're not waiting on the job: Comparable to Estimator.fit().
Screenshots or logs
Error as below:
ValueError: Logs can only be shown if wait is set to True.
Please either set wait to True or set logs to False.
System information
A description of your system. Please provide:
- SageMaker Python SDK version: 1.60.0
- Framework name (eg. PyTorch) or algorithm (eg. KMeans): AutoML
- Framework version: N/A
- Python version: 3.7.6
- CPU or GPU: CPU
- Custom Docker image (Y/N): N (SM Studio Py3 Data Science kernel)
Additional context
Relevant part of the documentation:
- 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).