Skip to content

change: update xgboost latest image version #1456

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

Merged
merged 2 commits into from
May 5, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/sagemaker/amazon/amazon_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
from sagemaker.xgboost.defaults import (
XGBOOST_LATEST_VERSION,
XGBOOST_SUPPORTED_VERSIONS,
XGBOOST_VERSION_1,
XGBOOST_VERSION_0_90_1,
XGBOOST_VERSION_0_90,
XGBOOST_VERSION_EQUIVALENTS,
)
from sagemaker.xgboost.estimator import get_xgboost_image_uri
Expand Down Expand Up @@ -626,8 +627,10 @@ def get_image_uri(region_name, repo_name, repo_version=1):
XGBOOST_LATEST_VERSION,
)

if repo_version in ["0.90", "0.90-1", "0.90-1-cpu-py3"]:
return get_xgboost_image_uri(region_name, XGBOOST_VERSION_1)
if repo_version in [XGBOOST_VERSION_0_90] + _generate_version_equivalents(
XGBOOST_VERSION_0_90_1
):
return get_xgboost_image_uri(region_name, XGBOOST_VERSION_0_90_1)

supported_version = [
version
Expand Down
12 changes: 9 additions & 3 deletions src/sagemaker/xgboost/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
from __future__ import absolute_import

XGBOOST_NAME = "xgboost"
XGBOOST_VERSION_1 = "0.90-1"
XGBOOST_LATEST_VERSION = "0.90-2"
XGBOOST_SUPPORTED_VERSIONS = [XGBOOST_VERSION_1, XGBOOST_LATEST_VERSION]
XGBOOST_VERSION_0_90 = "0.90"
XGBOOST_VERSION_0_90_1 = "0.90-1"
XGBOOST_VERSION_0_90_2 = "0.90-2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still feel like this constant is unnecessary. Let's ask @ericangelokim for a second opinion.

XGBOOST_LATEST_VERSION = "1.0-1"
XGBOOST_SUPPORTED_VERSIONS = [
XGBOOST_VERSION_0_90_1,
XGBOOST_VERSION_0_90_2,
XGBOOST_LATEST_VERSION,
]
XGBOOST_VERSION_EQUIVALENTS = ["-cpu-py3"]