Skip to content

Commit 42d80f8

Browse files
authored
remove vs detection in 110 notebook (#1815)
1 parent 8eae3f0 commit 42d80f8

File tree

1 file changed

+0
-77
lines changed

1 file changed

+0
-77
lines changed

notebooks/110-ct-segmentation-quantize/110-ct-segmentation-quantize-nncf.ipynb

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"cells": [
33
{
4-
"attachments": {},
54
"cell_type": "markdown",
65
"metadata": {},
76
"source": [
@@ -79,67 +78,13 @@
7978
]
8079
},
8180
{
82-
"attachments": {},
8381
"cell_type": "markdown",
8482
"metadata": {},
8583
"source": [
8684
"## Imports\n",
8785
"[back to top ⬆️](#Table-of-contents:)\n"
8886
]
8987
},
90-
{
91-
"cell_type": "code",
92-
"execution_count": 2,
93-
"metadata": {
94-
"tags": []
95-
},
96-
"outputs": [],
97-
"source": [
98-
"# On Windows, try to find the directory that contains x64 cl.exe and add it to the PATH to enable PyTorch\n",
99-
"# to find the required C++ tools. This code assumes that Visual Studio is installed in the default\n",
100-
"# directory. If you have a different C++ compiler, please add the correct path to os.environ[\"PATH\"]\n",
101-
"# directly. Note that the C++ Redistributable is not enough to run this notebook.\n",
102-
"\n",
103-
"# Adding the path to os.environ[\"LIB\"] is not always required - it depends on the system's configuration\n",
104-
"\n",
105-
"import sys\n",
106-
"\n",
107-
"if sys.platform == \"win32\":\n",
108-
" import distutils.command.build_ext\n",
109-
" import os\n",
110-
" from pathlib import Path\n",
111-
"\n",
112-
" if sys.getwindowsversion().build >= 20000: # Windows 11\n",
113-
" search_path = \"**/Hostx64/x64/cl.exe\"\n",
114-
" else:\n",
115-
" search_path = \"**/Hostx86/x64/cl.exe\"\n",
116-
"\n",
117-
" VS_INSTALL_DIR_2019 = r\"C:/Program Files (x86)/Microsoft Visual Studio\"\n",
118-
" VS_INSTALL_DIR_2022 = r\"C:/Program Files/Microsoft Visual Studio\"\n",
119-
"\n",
120-
" cl_paths_2019 = sorted(list(Path(VS_INSTALL_DIR_2019).glob(search_path)))\n",
121-
" cl_paths_2022 = sorted(list(Path(VS_INSTALL_DIR_2022).glob(search_path)))\n",
122-
" cl_paths = cl_paths_2019 + cl_paths_2022\n",
123-
"\n",
124-
" if len(cl_paths) == 0:\n",
125-
" raise ValueError(\n",
126-
" \"Cannot find Visual Studio. This notebook requires an x64 C++ compiler. If you installed \"\n",
127-
" \"a C++ compiler, please add the directory that contains cl.exe to `os.environ['PATH']`.\"\n",
128-
" )\n",
129-
" else:\n",
130-
" # If multiple versions of MSVC are installed, get the most recent version\n",
131-
" cl_path = cl_paths[-1]\n",
132-
" vs_dir = str(cl_path.parent)\n",
133-
" os.environ[\"PATH\"] += f\"{os.pathsep}{vs_dir}\"\n",
134-
" # Code for finding the library dirs from\n",
135-
" # https://stackoverflow.com/questions/47423246/get-pythons-lib-path\n",
136-
" d = distutils.core.Distribution()\n",
137-
" b = distutils.command.build_ext.build_ext(d)\n",
138-
" b.finalize_options()\n",
139-
" os.environ[\"LIB\"] = os.pathsep.join(b.library_dirs)\n",
140-
" print(f\"Added {vs_dir} to PATH\")"
141-
]
142-
},
14388
{
14489
"cell_type": "code",
14590
"execution_count": 3,
@@ -200,7 +145,6 @@
200145
]
201146
},
202147
{
203-
"attachments": {},
204148
"cell_type": "markdown",
205149
"metadata": {},
206150
"source": [
@@ -226,7 +170,6 @@
226170
]
227171
},
228172
{
229-
"attachments": {},
230173
"cell_type": "markdown",
231174
"metadata": {},
232175
"source": [
@@ -278,7 +221,6 @@
278221
]
279222
},
280223
{
281-
"attachments": {},
282224
"cell_type": "markdown",
283225
"metadata": {},
284226
"source": [
@@ -319,7 +261,6 @@
319261
]
320262
},
321263
{
322-
"attachments": {},
323264
"cell_type": "markdown",
324265
"metadata": {},
325266
"source": [
@@ -328,7 +269,6 @@
328269
]
329270
},
330271
{
331-
"attachments": {},
332272
"cell_type": "markdown",
333273
"metadata": {},
334274
"source": [
@@ -403,7 +343,6 @@
403343
]
404344
},
405345
{
406-
"attachments": {},
407346
"cell_type": "markdown",
408347
"metadata": {},
409348
"source": [
@@ -452,7 +391,6 @@
452391
]
453392
},
454393
{
455-
"attachments": {},
456394
"cell_type": "markdown",
457395
"metadata": {
458396
"tags": []
@@ -498,7 +436,6 @@
498436
]
499437
},
500438
{
501-
"attachments": {},
502439
"cell_type": "markdown",
503440
"metadata": {
504441
"tags": []
@@ -531,10 +468,8 @@
531468
]
532469
},
533470
{
534-
"attachments": {},
535471
"cell_type": "markdown",
536472
"metadata": {
537-
"collapsed": false,
538473
"jupyter": {
539474
"outputs_hidden": false
540475
}
@@ -578,7 +513,6 @@
578513
]
579514
},
580515
{
581-
"attachments": {},
582516
"cell_type": "markdown",
583517
"metadata": {
584518
"execution": {
@@ -710,7 +644,6 @@
710644
]
711645
},
712646
{
713-
"attachments": {},
714647
"cell_type": "markdown",
715648
"metadata": {},
716649
"source": [
@@ -753,10 +686,8 @@
753686
]
754687
},
755688
{
756-
"attachments": {},
757689
"cell_type": "markdown",
758690
"metadata": {
759-
"collapsed": false,
760691
"jupyter": {
761692
"outputs_hidden": false
762693
}
@@ -768,7 +699,6 @@
768699
]
769700
},
770701
{
771-
"attachments": {},
772702
"cell_type": "markdown",
773703
"metadata": {
774704
"tags": []
@@ -855,7 +785,6 @@
855785
]
856786
},
857787
{
858-
"attachments": {},
859788
"cell_type": "markdown",
860789
"metadata": {
861790
"tags": []
@@ -892,7 +821,6 @@
892821
]
893822
},
894823
{
895-
"attachments": {},
896824
"cell_type": "markdown",
897825
"metadata": {
898826
"tags": []
@@ -948,7 +876,6 @@
948876
]
949877
},
950878
{
951-
"attachments": {},
952879
"cell_type": "markdown",
953880
"metadata": {
954881
"tags": []
@@ -1046,7 +973,6 @@
1046973
]
1047974
},
1048975
{
1049-
"attachments": {},
1050976
"cell_type": "markdown",
1051977
"metadata": {
1052978
"tags": []
@@ -1063,7 +989,6 @@
1063989
]
1064990
},
1065991
{
1066-
"attachments": {},
1067992
"cell_type": "markdown",
1068993
"metadata": {},
1069994
"source": [
@@ -1101,7 +1026,6 @@
11011026
]
11021027
},
11031028
{
1104-
"attachments": {},
11051029
"cell_type": "markdown",
11061030
"metadata": {
11071031
"tags": []
@@ -1150,7 +1074,6 @@
11501074
]
11511075
},
11521076
{
1153-
"attachments": {},
11541077
"cell_type": "markdown",
11551078
"metadata": {},
11561079
"source": [

0 commit comments

Comments
 (0)