-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: move sagemaker config loading to LocalSession since it is only used for local code support. #1137
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
fix: move sagemaker config loading to LocalSession since it is only used for local code support. #1137
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -608,3 +608,22 @@ def __getattr__(self, name): | |
name: | ||
""" | ||
raise self.exc | ||
|
||
|
||
def _module_import_error(py_module, feature, extras): | ||
"""Return error message for module import errors, provide | ||
installation details. | ||
Args: | ||
py_module (str): Module that failed to be imported | ||
feature (str): Affected sagemaker feature | ||
extras (str): Name of the extra_requirements to install all of the dependencies | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
Returns: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: add a newline before "Returns" |
||
str: Error message with installation instructions. | ||
""" | ||
error_msg = ( | ||
"Failed to import {}. {} features will be impaired or broken." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: need a space after the second period |
||
"Please run \"pip install 'sagemaker[{}]'\" " | ||
"to install all required dependencies." | ||
) | ||
return error_msg.format(py_module, feature, extras) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/sagemaker/SageMaker