-
Notifications
You must be signed in to change notification settings - Fork 3k
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(ingest/sagemaker): Gracefully handle missing model group #12000
fix(ingest/sagemaker): Gracefully handle missing model group #12000
Conversation
Example: | ||
>>> arn = "arn:aws:sagemaker:eu-west-1:123456789:model-package-group/my-model-group" | ||
>>> get_group_name_from_arn(arn) | ||
"my-model-group" |
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.
you can use doctest to automatically turn this into a unit test
we have a few examples of this in our codebase already
full_table_name, | ||
f"""Note: table {full_table_name} is an AWS Glue object. | ||
logging.info( | ||
f"""Note: table {full_table_name} is an AWS Glue object. This source does not ingest all metadata for Glue tables. |
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.
the """
with newlines will make the subsequent lines have weird indentation
use textwrap.dedent
or do something like this
logging.info(f"""\
Note...
second line
""")
>>> get_group_name_from_arn(arn) | ||
"my-model-group" | ||
""" | ||
logger.info( |
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.
logger.info( | |
logger.debug( |
Checklist