Skip to content

Commit 9ecf079

Browse files
committed
Updated XGBoost version to 1.7.1
1 parent c10c92d commit 9ecf079

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

xgboost_script_mode_local_training_and_serving/xgboost_script_mode_local_training_and_serving.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616

1717
DUMMY_IAM_ROLE = 'arn:aws:iam::111111111111:role/service-role/AmazonSageMaker-ExecutionRole-20200101T000001'
1818
LOCAL_SESSION = LocalSession()
19-
LOCAL_SESSION.config={'local': {'local_code': True}} # Ensure full code locality, see: https://sagemaker.readthedocs.io/en/stable/overview.html#local-mode
19+
LOCAL_SESSION.config = {'local': {'local_code': True}} # Ensure full code locality, see: https://sagemaker.readthedocs.io/en/stable/overview.html#local-mode
20+
FRAMEWORK_VERSION = "1.7-1"
2021

2122

2223
def do_inference_on_local_endpoint(predictor, libsvm_str):
@@ -27,7 +28,8 @@ def do_inference_on_local_endpoint(predictor, libsvm_str):
2728

2829
def main():
2930
print('Starting model training.')
30-
print('Note: if launching for the first time in local mode, container image download might take a few minutes to complete.')
31+
print(
32+
'Note: if launching for the first time in local mode, container image download might take a few minutes to complete.')
3133

3234
hyperparameters = {
3335
"max_depth": "5",
@@ -46,9 +48,9 @@ def main():
4648
role=DUMMY_IAM_ROLE,
4749
instance_count=1,
4850
instance_type='local',
49-
framework_version="1.2-1",
51+
framework_version=FRAMEWORK_VERSION,
5052
sagemaker_session=LOCAL_SESSION,
51-
output_path='file://model/' # Save trained model and any additional artifacts locally
53+
output_path='file://model/' # Save trained model and any additional artifacts locally
5254
)
5355

5456
train_input = TrainingInput("file://data/train/abalone", content_type="text/libsvm")
@@ -65,7 +67,7 @@ def main():
6567
role=DUMMY_IAM_ROLE,
6668
entry_point="inference.py",
6769
source_dir="./code",
68-
framework_version="1.2-1",
70+
framework_version=FRAMEWORK_VERSION,
6971
sagemaker_session=LOCAL_SESSION
7072
)
7173

0 commit comments

Comments
 (0)