Skip to content

XGBoost: latest tag is confusing and should be removed #1838

@iyerr3

Description

@iyerr3

Describe the bug
A common "bug" that customers report for XGBoost is that the latest tag is an alias to the oldest version instead of the newest. This is done due to backwards compatibility reasons and is not available in any of the other framework containers.
With v2 of the SDK, I suggest removing the use of the latest tag. Since v2 has already been released, this may affect some customers that have upgraded and are using the latest tag; hence we'll have to add this as a breaking change warning in the release notes. I would like to posit that the impact would be low enough that customers benefit with this change in the long run.

To reproduce
Currently returning the oldest image URI

>>> sagemaker.image_uris.retrieve('xgboost', 'us-west-2', 'latest')
'433757028032.dkr.ecr.us-west-2.amazonaws.com/xgboost:latest'

Expected behavior
Expect an error of the form below:

>>> sagemaker.image_uris.retrieve('xgboost', 'us-west-2', 'latest')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/sagemaker/image_uris.py", line 63, in retrieve
    version = _validate_version_and_set_if_needed(version, config, framework)
  File "/usr/local/lib/python3.7/site-packages/sagemaker/image_uris.py", line 151, in _validate_version_and_set_if_needed
    _validate_arg(version, available_versions + aliased_versions, "{} version".format(framework))
  File "/usr/local/lib/python3.7/site-packages/sagemaker/image_uris.py", line 241, in _validate_arg
    "{options}.".format(arg_name=arg_name, arg=arg, options=", ".join(available_options))
ValueError: Unsupported xgboost version: latest. You may need to upgrade your SDK version (pip install -U sagemaker) for newer xgboost versions. Supported xgboost version(s): 1, 0.90-1, 0.90-2, 1.0-1

System information
A description of your system. Please provide:

  • SageMaker Python SDK version: 2.3.0
  • Framework name (eg. PyTorch) or algorithm (eg. KMeans): XGBoost
  • Framework version: latest
  • Python version: 3.7
  • CPU or GPU: CPU
  • Custom Docker image (Y/N): N

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions