From 836b3e981a657b96473bb53b282c77ff762a544e Mon Sep 17 00:00:00 2001 From: Nakul Upadhya Date: Sun, 8 Feb 2026 22:42:06 -0500 Subject: [PATCH 1/6] Update dependencies in pyproject.toml Removed 'umap>=0.1.1' and added 'umap-learn==0.5.7' and 'llvmlite>=0.45.0' to dependencies. --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 97292d176..65c3ea11c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,7 @@ dependencies = [ "ipython>=9.5.0", "keras>=3.11.3", "matplotlib>=3.10.6", + "umap-learn==0.5.7", "numpy>=2.3.3", "plotly>=6.3.0", "scikit-image>=0.25.2", @@ -17,5 +18,5 @@ dependencies = [ "tensorflow>=2.20.0", "torch>=2.8.0", "torchvision>=0.23.0", - "umap>=0.1.1", + "llvmlite>=0.45.0" ] From 4b2dd0e83605e949ef50c29553fb35f5d7ee9c8b Mon Sep 17 00:00:00 2001 From: upadhyan Date: Sun, 8 Feb 2026 23:26:14 -0500 Subject: [PATCH 2/6] sklearn version fixes --- pyproject.toml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 65c3ea11c..48e8dd1c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "deep-learning-env" -version = "0.1.0" +version = "0.1.2" requires-python = ">=3.11" dependencies = [ "ipykernel>=6.30.1", @@ -12,11 +12,15 @@ dependencies = [ "numpy>=2.3.3", "plotly>=6.3.0", "scikit-image>=0.25.2", - "scikit-learn>=1.7.2", + "scikit-learn>=1.6.0,<1.7", "seaborn>=0.13.2", "sequence>=0.8.0", "tensorflow>=2.20.0", "torch>=2.8.0", "torchvision>=0.23.0", - "llvmlite>=0.45.0" + "llvmlite>=0.45.0", + "transformers>=4.51.0", + "accelerate>=1.6.0", + "jupyter>=1.1.1", + "jupyterlab>=4.3.0" ] From 031425cb7916bdd7c3413466df27ede8dcadf9ef Mon Sep 17 00:00:00 2001 From: upadhyan Date: Sun, 8 Feb 2026 23:33:54 -0500 Subject: [PATCH 3/6] disabling gpu in first lab --- 01_materials/labs/lab_1.ipynb | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/01_materials/labs/lab_1.ipynb b/01_materials/labs/lab_1.ipynb index 667fd306e..90298483d 100644 --- a/01_materials/labs/lab_1.ipynb +++ b/01_materials/labs/lab_1.ipynb @@ -35,6 +35,22 @@ "metadata": {}, "outputs": [], "source": [ + "\n", + "import tensorflow as tf\n", + "\n", + "try:\n", + " # Disable all GPUs\n", + " tf.config.set_visible_devices([], 'GPU')\n", + "\n", + " visible_devices = tf.config.get_visible_devices()\n", + " for device in visible_devices:\n", + " assert device.device_type != 'GPU'\n", + " print(\"GPUs disabled, using CPU.\")\n", + "\n", + "except:\n", + " # Invalid device or cannot modify virtual devices once initialized.\n", + " pass\n", + "\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "\n", @@ -813,7 +829,7 @@ "metadata": { "file_extension": ".py", "kernelspec": { - "display_name": ".venv", + "display_name": "deep-learning-env", "language": "python", "name": "python3" }, @@ -827,7 +843,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.12" + "version": "3.11.14" }, "mimetype": "text/x-python", "name": "python", From 3486de785657df6f6f1adc1c17f926050eaa606c Mon Sep 17 00:00:00 2001 From: upadhyan Date: Sun, 8 Feb 2026 23:42:00 -0500 Subject: [PATCH 4/6] move gpu disabling to seperate cell + add disabling to lab 3 --- 01_materials/labs/lab_1.ipynb | 13 +++++++++++-- 01_materials/labs/lab_3.ipynb | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/01_materials/labs/lab_1.ipynb b/01_materials/labs/lab_1.ipynb index 90298483d..25b751340 100644 --- a/01_materials/labs/lab_1.ipynb +++ b/01_materials/labs/lab_1.ipynb @@ -35,7 +35,7 @@ "metadata": {}, "outputs": [], "source": [ - "\n", + "## Tensorflow GPU disabled by default. Comment the following lines to enable GPU if you have a working CUDA installation.\n", "import tensorflow as tf\n", "\n", "try:\n", @@ -49,7 +49,16 @@ "\n", "except:\n", " # Invalid device or cannot modify virtual devices once initialized.\n", - " pass\n", + " pass" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "\n", "\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", diff --git a/01_materials/labs/lab_3.ipynb b/01_materials/labs/lab_3.ipynb index 7ac8da00d..ef6d808c7 100644 --- a/01_materials/labs/lab_3.ipynb +++ b/01_materials/labs/lab_3.ipynb @@ -13,6 +13,29 @@ "We will download a subset of the dataset containing 100k ratings. There are tens of millions of ratings in the full dataset, spanning hundreds of thousands of users and movies. The subset we'll be using is a good example to demonstrate the concepts in this lab." ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "## Tensorflow GPU disabled by default. Comment the following lines to enable GPU if you have a working CUDA installation.\n", + "import tensorflow as tf\n", + "\n", + "try:\n", + " # Disable all GPUs\n", + " tf.config.set_visible_devices([], 'GPU')\n", + "\n", + " visible_devices = tf.config.get_visible_devices()\n", + " for device in visible_devices:\n", + " assert device.device_type != 'GPU'\n", + " print(\"GPUs disabled, using CPU.\")\n", + "\n", + "except:\n", + " # Invalid device or cannot modify virtual devices once initialized.\n", + " pass" + ] + }, { "cell_type": "code", "execution_count": null, From 2862400ab6a88aa966f26959e22ecf86b05e44fc Mon Sep 17 00:00:00 2001 From: upadhyan Date: Sun, 8 Feb 2026 23:53:55 -0500 Subject: [PATCH 5/6] remove gpu from lab 4 --- 01_materials/labs/lab_4.ipynb | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/01_materials/labs/lab_4.ipynb b/01_materials/labs/lab_4.ipynb index 49316d21a..bfa4a878d 100644 --- a/01_materials/labs/lab_4.ipynb +++ b/01_materials/labs/lab_4.ipynb @@ -22,6 +22,29 @@ "We'll use the `skimage` library to read and process images. It's a library dedicated to image processing, which is part of the `scikit-learn` family." ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "## Tensorflow GPU disabled by default. Comment the following lines to enable GPU if you have a working CUDA installation.\n", + "import tensorflow as tf\n", + "\n", + "try:\n", + " # Disable all GPUs\n", + " tf.config.set_visible_devices([], 'GPU')\n", + "\n", + " visible_devices = tf.config.get_visible_devices()\n", + " for device in visible_devices:\n", + " assert device.device_type != 'GPU'\n", + " print(\"GPUs disabled, using CPU.\")\n", + "\n", + "except:\n", + " # Invalid device or cannot modify virtual devices once initialized.\n", + " pass" + ] + }, { "cell_type": "code", "execution_count": null, @@ -718,7 +741,7 @@ "provenance": [] }, "kernelspec": { - "display_name": "lab_1", + "display_name": "deep-learning-env", "language": "python", "name": "python3" }, @@ -732,7 +755,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.9" + "version": "3.11.14" } }, "nbformat": 4, From d67f93d0427488aacf15a264f235962915ea27a4 Mon Sep 17 00:00:00 2001 From: upadhyan Date: Mon, 9 Feb 2026 00:04:39 -0500 Subject: [PATCH 6/6] remove gpu from 5 and 6 --- 01_materials/labs/lab_5.ipynb | 23 +++++++++++++++++++++++ 01_materials/labs/lab_6.ipynb | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/01_materials/labs/lab_5.ipynb b/01_materials/labs/lab_5.ipynb index 4d8869e8b..8695395a9 100644 --- a/01_materials/labs/lab_5.ipynb +++ b/01_materials/labs/lab_5.ipynb @@ -17,6 +17,29 @@ "We will use the Pascal VOC 2007 dataset, which contains 20 classes of objects. We will only use 5 classes: \"dog\", \"cat\", \"bus\", \"car\", \"aeroplane\". To get started, we will use a pre-trained ResNet50 model to precompute the convolutional representations of the images. We will then build a simple model to predict the class and the bounding box of the object in the image." ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "## Tensorflow GPU disabled by default. Comment the following lines to enable GPU if you have a working CUDA installation.\n", + "import tensorflow as tf\n", + "\n", + "try:\n", + " # Disable all GPUs\n", + " tf.config.set_visible_devices([], 'GPU')\n", + "\n", + " visible_devices = tf.config.get_visible_devices()\n", + " for device in visible_devices:\n", + " assert device.device_type != 'GPU'\n", + " print(\"GPUs disabled, using CPU.\")\n", + "\n", + "except:\n", + " # Invalid device or cannot modify virtual devices once initialized.\n", + " pass" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/01_materials/labs/lab_6.ipynb b/01_materials/labs/lab_6.ipynb index c9685c873..8d3c4c5cc 100644 --- a/01_materials/labs/lab_6.ipynb +++ b/01_materials/labs/lab_6.ipynb @@ -14,6 +14,29 @@ "- Use these pre-trained embeddings" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "## Tensorflow GPU disabled by default. Comment the following lines to enable GPU if you have a working CUDA installation.\n", + "import tensorflow as tf\n", + "\n", + "try:\n", + " # Disable all GPUs\n", + " tf.config.set_visible_devices([], 'GPU')\n", + "\n", + " visible_devices = tf.config.get_visible_devices()\n", + " for device in visible_devices:\n", + " assert device.device_type != 'GPU'\n", + " print(\"GPUs disabled, using CPU.\")\n", + "\n", + "except:\n", + " # Invalid device or cannot modify virtual devices once initialized.\n", + " pass" + ] + }, { "cell_type": "markdown", "metadata": {},