-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: blacklist unknown xgboost image versions #1519
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
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@balajitummala @aws-patlin Can you please review? |
if xgboost_version_matches: | ||
# Assumes that XGBOOST_SUPPORTED_VERSION is sorted from oldest version to latest, | ||
# and the latest version is at the end of the list. | ||
repo_version = xgboost_version_matches[-1] |
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.
For backwards compatibility, I don't think this is the behavior we want. If a customer is setting "0.90" as the repo_version
and was previously getting the 0.90-1 image, we don't want to suddenly give them the 0.90-2 image.
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.
I think you are right. We don't want to change 0.90 -> 0.90-2 if customers were getting 0.90-1 previously. Will update.
== "246618743249.dkr.ecr.us-west-2.amazonaws.com/sagemaker-xgboost:0.90-2-cpu-py3" | ||
) | ||
assert ( | ||
get_image_uri(REGION, "xgboost", "0.90") |
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.
Once again, we were previously returning the 0.90-1 image for this. Let's check with Rahul on whether or not we want this new behavior.
tests/unit/test_amazon_estimator.py
Outdated
assert _is_latest_xgboost_version("0.90-1-cpu-py3") is False | ||
|
||
assert _is_latest_xgboost_version("0.90-2-cpu-py3") is False |
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 just perform a loop over the supported versions, excluding the last entry? That way we don't need to add a new line each time there's a new version.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Looks like there's a formatting issue in one of the files. You'll need to run black to fix it. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thanks! @aws-patlin |
looks like @aws-patlin approved it earlier. let me know if you want any other approvals; otherwise, I'll treat it as ready to be merged in. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue #, if available:
Description of changes:
When an unknown version is passed to the
repo_version
parameter of get_image_uri, the function prints a misleading warning and returns a completely wrong image URI.Not only
1.1-1
is currently unavailable, the account433757028032
and repositoryxgboost
are for 1p xgboost, not OS XGBoost. This is an un undesired behavior.Desired behavior:
This PR changes
get_image_uri()
to blacklist unknown xgboost image versions and adds appropriate unit tests.Testing done:
export IGNORE_COVERAGE=- ; tox -e black-format,flake8,pylint,py36 tests/unit/test_amazon_estimator.py; unset IGNORE_COVERAGE
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
unique_name_from_base
to create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.