aws / sagemaker-python-sdk

A library for training and deploying machine learning models on Amazon SageMaker
https://sagemaker.readthedocs.io/
Apache License 2.0
2.09k stars 1.13k forks source link

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

Open iyerr3 opened 4 years ago

iyerr3 commented 4 years ago

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:

metrizable commented 4 years ago

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,

ajaykarpur commented 4 years ago

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.