Skip to content

Commit 5233dfc

Browse files
change: require framework_version, py_version for xgboost (#1570)
* small updates to docstrings * small updates to tests Co-authored-by: Chuyang <chuyangdeng@gmail.com>
1 parent 09336f7 commit 5233dfc

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/sagemaker/xgboost/estimator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __init__(
8585
on SageMaker. For convenience, this accepts other types for keys and values, but
8686
``str()`` will be called to convert them before training.
8787
py_version (str): Python version you want to use for executing your model
88-
training code (default: 'py3'). One of 'py2' or 'py3'.
88+
training code (default: 'py3').
8989
image_name (str): If specified, the estimator will use this image for training and
9090
hosting, instead of selecting the appropriate SageMaker official image
9191
based on framework_version and py_version. It can be an ECR url or

src/sagemaker/xgboost/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(
7979
image (str): A Docker image URI (default: None). If not specified, a default image for
8080
XGBoos will be used.
8181
py_version (str): Python version you want to use for executing your model training code
82-
(default: 'py2').
82+
(default: 'py3').
8383
framework_version (str): XGBoost version you want to use for executing your model
8484
training code.
8585
predictor_cls (callable[str, sagemaker.session.Session]): A function to call to create

tests/integ/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
TUNING_DEFAULT_TIMEOUT_MINUTES = 20
2424
TRANSFORM_DEFAULT_TIMEOUT_MINUTES = 20
2525
AUTO_ML_DEFAULT_TIMEMOUT_MINUTES = 60
26-
PYTHON_VERSION = "py" + str(sys.version_info.major)
26+
PYTHON_VERSION = "py{}".format(sys.version_info.major)
2727

2828
# these regions have some p2 and p3 instances, but not enough for continuous testing
2929
HOSTING_NO_P2_REGIONS = [

tests/integ/test_airflow_config.py

+1
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ def test_tf_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_inst
582582

583583

584584
@pytest.mark.canary_quick
585+
@pytest.mark.skipif(PYTHON_VERSION == "py2", reason="XGBoost container does not support Python 2.")
585586
def test_xgboost_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_instance_type):
586587
with timeout(seconds=AIRFLOW_CONFIG_TIMEOUT_IN_SECONDS):
587588
xgboost = XGBoost(

0 commit comments

Comments
 (0)