diff --git a/notebooks/110-ct-segmentation-quantize/110-ct-segmentation-quantize-nncf.ipynb b/notebooks/110-ct-segmentation-quantize/110-ct-segmentation-quantize-nncf.ipynb index 32806d29c94..b0166d61859 100644 --- a/notebooks/110-ct-segmentation-quantize/110-ct-segmentation-quantize-nncf.ipynb +++ b/notebooks/110-ct-segmentation-quantize/110-ct-segmentation-quantize-nncf.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -79,7 +78,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -87,59 +85,6 @@ "[back to top ⬆️](#Table-of-contents:)\n" ] }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "# On Windows, try to find the directory that contains x64 cl.exe and add it to the PATH to enable PyTorch\n", - "# to find the required C++ tools. This code assumes that Visual Studio is installed in the default\n", - "# directory. If you have a different C++ compiler, please add the correct path to os.environ[\"PATH\"]\n", - "# directly. Note that the C++ Redistributable is not enough to run this notebook.\n", - "\n", - "# Adding the path to os.environ[\"LIB\"] is not always required - it depends on the system's configuration\n", - "\n", - "import sys\n", - "\n", - "if sys.platform == \"win32\":\n", - " import distutils.command.build_ext\n", - " import os\n", - " from pathlib import Path\n", - "\n", - " if sys.getwindowsversion().build >= 20000: # Windows 11\n", - " search_path = \"**/Hostx64/x64/cl.exe\"\n", - " else:\n", - " search_path = \"**/Hostx86/x64/cl.exe\"\n", - "\n", - " VS_INSTALL_DIR_2019 = r\"C:/Program Files (x86)/Microsoft Visual Studio\"\n", - " VS_INSTALL_DIR_2022 = r\"C:/Program Files/Microsoft Visual Studio\"\n", - "\n", - " cl_paths_2019 = sorted(list(Path(VS_INSTALL_DIR_2019).glob(search_path)))\n", - " cl_paths_2022 = sorted(list(Path(VS_INSTALL_DIR_2022).glob(search_path)))\n", - " cl_paths = cl_paths_2019 + cl_paths_2022\n", - "\n", - " if len(cl_paths) == 0:\n", - " raise ValueError(\n", - " \"Cannot find Visual Studio. This notebook requires an x64 C++ compiler. If you installed \"\n", - " \"a C++ compiler, please add the directory that contains cl.exe to `os.environ['PATH']`.\"\n", - " )\n", - " else:\n", - " # If multiple versions of MSVC are installed, get the most recent version\n", - " cl_path = cl_paths[-1]\n", - " vs_dir = str(cl_path.parent)\n", - " os.environ[\"PATH\"] += f\"{os.pathsep}{vs_dir}\"\n", - " # Code for finding the library dirs from\n", - " # https://stackoverflow.com/questions/47423246/get-pythons-lib-path\n", - " d = distutils.core.Distribution()\n", - " b = distutils.command.build_ext.build_ext(d)\n", - " b.finalize_options()\n", - " os.environ[\"LIB\"] = os.pathsep.join(b.library_dirs)\n", - " print(f\"Added {vs_dir} to PATH\")" - ] - }, { "cell_type": "code", "execution_count": 3, @@ -200,7 +145,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -226,7 +170,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -278,7 +221,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -319,7 +261,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -328,7 +269,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -403,7 +343,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -452,7 +391,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": { "tags": [] @@ -498,7 +436,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": { "tags": [] @@ -531,10 +468,8 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": { - "collapsed": false, "jupyter": { "outputs_hidden": false } @@ -578,7 +513,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": { "execution": { @@ -710,7 +644,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -753,10 +686,8 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": { - "collapsed": false, "jupyter": { "outputs_hidden": false } @@ -768,7 +699,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": { "tags": [] @@ -855,7 +785,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": { "tags": [] @@ -892,7 +821,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": { "tags": [] @@ -948,7 +876,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": { "tags": [] @@ -1046,7 +973,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": { "tags": [] @@ -1063,7 +989,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -1101,7 +1026,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": { "tags": [] @@ -1150,7 +1074,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [