Skip to content

Commit d3d2650

Browse files
committed
fix local mode instance type edge case
1 parent f4dbcd3 commit d3d2650

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sagemaker-python-sdk/pytorch_cnn_cifar10/pytorch_local_mode_cifar10.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@
6767
"import os\n",
6868
"import subprocess\n",
6969
"\n",
70+
"instance_type = \"local\"\n",
71+
"\n",
7072
"try:\n",
7173
" if subprocess.call(\"nvidia-smi\") == 0:\n",
7274
" ## Set type to GPU if one is present\n",
7375
" instance_type = \"local_gpu\"\n",
7476
"except:\n",
75-
" instance_type = \"local\"\n",
77+
" pass\n",
7678
"\n",
7779
"print(\"Instance type = \" + instance_type)"
7880
]

0 commit comments

Comments
 (0)