sagemaker-python-sdk icon indicating copy to clipboard operation
sagemaker-python-sdk copied to clipboard

XGBoost: `latest` tag is confusing and should be removed

Open iyerr3 opened this issue 5 years ago • 2 comments

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

iyerr3 avatar Aug 16 '20 13:08 iyerr3

Hello @iyerr3 ,

Thank you for using Amazon SageMaker. We are looking into your issue. Will get back to you with an update by 2020-08-20 17:00 Pacific time.

Best regards,

metrizable avatar Aug 17 '20 15:08 metrizable

Hi @iyerr3, thank you for bringing this to our attention. Since this is a breaking change, it will need to go into the next major version release in order to adhere to semantic versioning. We'll keep track of this as we prioritize changes for the next release.

ajaykarpur avatar Aug 20 '20 20:08 ajaykarpur