-
Notifications
You must be signed in to change notification settings - Fork 36
Add Search Expression support #70
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
Conversation
GREATER_THAN_OR_EQUAL = "GreaterThanOrEqualTo" | ||
LESS_THAN = "LessThan" | ||
LESS_THAN_OR_EQUAL = "LessThanOrEqualTo" | ||
CONTAINS = "Contains" |
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.
should the "In" operator also be in this list?
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.
Operator list is taken from boto spec: https://boto3.amazonaws.com/v1/documentation/api/1.12.8/reference/services/sagemaker.html#SageMaker.Client.search
I only listed all available options from there.
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.
IN will be released today.
search_filter = Filter(name="ExperimentName", operator=Operator.CONTAINS, value="smexperiments-integ-") | ||
search_expression = SearchExpression(filters=[search_filter]) | ||
for s in Experiment.search( | ||
search_expression=search_expression.to_boto(), max_results=10, sagemaker_boto_client=sagemaker_boto_client |
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.
can we avoid calling code using "to_boto"? Seems like the usage would be cleaner without it.
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.
agree and removed the need for to_boto here
Issue #, if available:
Description of changes:
Testing done:
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.