From c1f90b20c7dd694f3b7fb14c40fb41e9664809ca Mon Sep 17 00:00:00 2001 From: Austin Baker <48272253+austincbaker@users.noreply.github.com> Date: Mon, 23 Jun 2025 09:02:08 -0400 Subject: [PATCH 1/4] Update C1_W3_Assignment.ipynb Fixes problem where C1_W3 can't be graded because the incorrect tensorflow versions are not met. Modern python versions past 3.8.10 do not seem to work correctly, so this module will enforce that requirement along with the other package version requirements. --- .../W3/assignment/C1_W3_Assignment.ipynb | 78 ++++++++++++++----- 1 file changed, 60 insertions(+), 18 deletions(-) diff --git a/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb b/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb index c924d755..1d668771 100644 --- a/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb +++ b/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb @@ -23,6 +23,66 @@ "# limitations under the License." ] }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "YHK6DyunSbs4" + }, + "source": [ + '# Note: To complete this module and continue the course, you must have python 3.8.10 installed.\n', + 'You can find it by visiting python.org and searching for Python 3.8.10\n', + 'Or you can follow this link: https://www.python.org/downloads/release/python-3810/' + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n" + "def assert_python_version():\n" + " current_major = sys.version_info.major\n" + " current_minor = sys.version_info.minor\n" + " # Check for major version first\n" + " if current_major < 3:\n" + " return # Version is less than 3.0, so its less than 3.8\n" + " if current_major > 3:\n" + " raise AssertionError('Bad Major Version. Check you have python verson 3.8.10')\n" + " # If major version is 3, check minor version\n" + " if current_minor > 8:\n" + " raise AssertionError('Bad Minor Version. Check that you have python 3.8.10')\n" + " print('Python version check passed.')\n" + "assert_python_version()\n'" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "YHK6DyunSbs4" + }, + "source": [ + '# Additionally, the following modules and versions must be used' + ] + }, + + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%pip install tensorflow==2.2.0\n", + "%pip install tensorflowjs==2.8.5\n", + "%pip install tensorflow-estimator==2.2.0\n", + "%pip install protobuf==3.12.2\n", + "%pip uninstall numpy\n", + "%pip install numpy==1.19.3\n", + "%pip install matplotlib==3.4.2\n" + ] + }, { "cell_type": "markdown", "metadata": { @@ -56,24 +116,6 @@ "**Note:** Use TensorFlow version 2.2.0 for this assignment. **Using a TensorFlow version >2.2.0 will result in failure of grading.**" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "!pip install tensorflow==2.2" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#!pip install tensorflowjs" - ] - }, { "cell_type": "code", "execution_count": null, From b8e11e01ae4042c70ac911c1c151ca855ca1362f Mon Sep 17 00:00:00 2001 From: Austin Baker <48272253+austincbaker@users.noreply.github.com> Date: Mon, 23 Jun 2025 09:04:21 -0400 Subject: [PATCH 2/4] Update C1_W3_Assignment.ipynb Formatting --- .../W3/assignment/C1_W3_Assignment.ipynb | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb b/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb index 1d668771..95531195 100644 --- a/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb +++ b/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb @@ -30,9 +30,9 @@ "id": "YHK6DyunSbs4" }, "source": [ - '# Note: To complete this module and continue the course, you must have python 3.8.10 installed.\n', - 'You can find it by visiting python.org and searching for Python 3.8.10\n', - 'Or you can follow this link: https://www.python.org/downloads/release/python-3810/' + "# Note: To complete this module and continue the course, you must have python 3.8.10 installed.\n", + "## You can find it by visiting python.org and searching for Python 3.8.10\n", + "## Or you can follow this link: https://www.python.org/downloads/release/python-3810/" ] }, { @@ -42,18 +42,18 @@ "outputs": [], "source": [ "import sys\n" - "def assert_python_version():\n" - " current_major = sys.version_info.major\n" - " current_minor = sys.version_info.minor\n" - " # Check for major version first\n" - " if current_major < 3:\n" - " return # Version is less than 3.0, so its less than 3.8\n" - " if current_major > 3:\n" - " raise AssertionError('Bad Major Version. Check you have python verson 3.8.10')\n" - " # If major version is 3, check minor version\n" - " if current_minor > 8:\n" - " raise AssertionError('Bad Minor Version. Check that you have python 3.8.10')\n" - " print('Python version check passed.')\n" + "def assert_python_version():\n", + " current_major = sys.version_info.major\n", + " current_minor = sys.version_info.minor\n", + " # Check for major version first\n", + " if current_major < 3:\n", + " return # Version is less than 3.0, so its less than 3.8\n", + " if current_major > 3:\n", + " raise AssertionError('Bad Major Version. Check you have python verson 3.8.10')\n", + " # If major version is 3, check minor version\n", + " if current_minor > 8:\n", + " raise AssertionError('Bad Minor Version. Check that you have python 3.8.10')\n", + " print('Python version check passed.')\n", "assert_python_version()\n'" ] }, @@ -67,7 +67,6 @@ '# Additionally, the following modules and versions must be used' ] }, - { "cell_type": "code", "execution_count": null, From ebd5251d266757c472052378b47d9b9877085278 Mon Sep 17 00:00:00 2001 From: Austin Baker <48272253+austincbaker@users.noreply.github.com> Date: Mon, 23 Jun 2025 09:07:48 -0400 Subject: [PATCH 3/4] Update C1_W3_Assignment.ipynb format again --- C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb b/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb index 95531195..32a791f9 100644 --- a/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb +++ b/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb @@ -41,7 +41,7 @@ "metadata": {}, "outputs": [], "source": [ - "import sys\n" + "import sys\n", "def assert_python_version():\n", " current_major = sys.version_info.major\n", " current_minor = sys.version_info.minor\n", @@ -54,8 +54,8 @@ " if current_minor > 8:\n", " raise AssertionError('Bad Minor Version. Check that you have python 3.8.10')\n", " print('Python version check passed.')\n", - "assert_python_version()\n'" - ] + "assert_python_version()\n" +] }, { "cell_type": "markdown", From 5d2693e69ba12109a8cf10ad6abae57866dd9c21 Mon Sep 17 00:00:00 2001 From: Austin Baker <48272253+austincbaker@users.noreply.github.com> Date: Mon, 23 Jun 2025 09:09:16 -0400 Subject: [PATCH 4/4] Update C1_W3_Assignment.ipynb Format --- C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb b/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb index 32a791f9..3120519e 100644 --- a/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb +++ b/C1_Browser-based-TF-JS/W3/assignment/C1_W3_Assignment.ipynb @@ -64,7 +64,7 @@ "id": "YHK6DyunSbs4" }, "source": [ - '# Additionally, the following modules and versions must be used' + "# Additionally, the following modules and versions must be used" ] }, { @@ -72,14 +72,14 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": [ + "source": [ "%pip install tensorflow==2.2.0\n", "%pip install tensorflowjs==2.8.5\n", "%pip install tensorflow-estimator==2.2.0\n", "%pip install protobuf==3.12.2\n", "%pip uninstall numpy\n", "%pip install numpy==1.19.3\n", - "%pip install matplotlib==3.4.2\n" + "%pip install matplotlib==3.4.2\n" ] }, {