Skip to content

Commit 6f86c68

Browse files
authored
Verify sagemaker SDK version (#1606)
1 parent 09ad9a7 commit 6f86c68

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

sagemaker_neo_compilation_jobs/pytorch_torchvision/pytorch_torchvision_neo.ipynb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
"!~/anaconda3/envs/pytorch_p36/bin/pip install torch==1.4.0 torchvision==0.5.0"
2424
]
2525
},
26+
{
27+
"cell_type": "markdown",
28+
"metadata": {},
29+
"source": [
30+
"### SageMaker SDK >= 2.0 is required for this notebook"
31+
]
32+
},
2633
{
2734
"cell_type": "code",
2835
"execution_count": null,
@@ -32,6 +39,18 @@
3239
"!~/anaconda3/envs/pytorch_p36/bin/pip install --upgrade sagemaker"
3340
]
3441
},
42+
{
43+
"cell_type": "code",
44+
"execution_count": null,
45+
"metadata": {},
46+
"outputs": [],
47+
"source": [
48+
"import sagemaker\n",
49+
"current_version = sagemaker.__version__\n",
50+
"if current_version.split('.')[0] == '1':\n",
51+
" raise Exception(\"Please upgrade SageMaker SDK by running the above code cell and restart the kernel\")"
52+
]
53+
},
3554
{
3655
"cell_type": "markdown",
3756
"metadata": {},

sagemaker_neo_compilation_jobs/pytorch_vgg19_bn/pytorch-vgg19-bn.ipynb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
"!~/anaconda3/envs/pytorch_p36/bin/pip install torch==1.4.0 torchvision==0.5.0"
2828
]
2929
},
30+
{
31+
"cell_type": "markdown",
32+
"metadata": {},
33+
"source": [
34+
"### SageMaker SDK >= 2.0 is required for this notebook"
35+
]
36+
},
3037
{
3138
"cell_type": "code",
3239
"execution_count": null,
@@ -36,6 +43,18 @@
3643
"!~/anaconda3/envs/pytorch_p36/bin/pip install --upgrade sagemaker"
3744
]
3845
},
46+
{
47+
"cell_type": "code",
48+
"execution_count": null,
49+
"metadata": {},
50+
"outputs": [],
51+
"source": [
52+
"import sagemaker\n",
53+
"current_version = sagemaker.__version__\n",
54+
"if current_version.split('.')[0] == '1':\n",
55+
" raise Exception(\"Please upgrade SageMaker SDK by running the above code cell and restart the kernel\")"
56+
]
57+
},
3958
{
4059
"cell_type": "markdown",
4160
"metadata": {},

0 commit comments

Comments
 (0)