From 226071741f78f0d68e406d28d43242ac20066a10 Mon Sep 17 00:00:00 2001 From: "Ryan M. Moore" Date: Mon, 6 Jan 2025 17:59:15 -0500 Subject: [PATCH] Add S5 env check --- Submodule_5/Submodule_5_Env_Check.ipynb | 106 ++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Submodule_5/Submodule_5_Env_Check.ipynb diff --git a/Submodule_5/Submodule_5_Env_Check.ipynb b/Submodule_5/Submodule_5_Env_Check.ipynb new file mode 100644 index 0000000..328b5c5 --- /dev/null +++ b/Submodule_5/Submodule_5_Env_Check.ipynb @@ -0,0 +1,106 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Environment Check -- Submodule 5\n", + "\n", + "If this notebook runs successfully, then all the required packages for Submodule 4 are properly installed.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: jupyterquiz in /home/ryan/miniconda3/envs/nigms_sandbox_ud__submodule_4_exported/lib/python3.9/site-packages (2.8.1)\n", + "Note: you may need to restart the kernel to use updated packages.\n", + "OK!\n" + ] + } + ], + "source": [ + "import os\n", + "import warnings\n", + "from collections import Counter\n", + "\n", + "import deepchem as dc\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "import pandas as pd\n", + "import seaborn as sns\n", + "import tensorflow as tf\n", + "from IPython.display import YouTubeVideo\n", + "from jupyterquiz import display_quiz\n", + "from keras.callbacks import EarlyStopping\n", + "from keras.layers import (\n", + " LSTM,\n", + " Bidirectional,\n", + " Conv1D,\n", + " Dense,\n", + " Dropout,\n", + " Embedding,\n", + " Flatten,\n", + " Input,\n", + " MaxPooling1D,\n", + ")\n", + "from keras.models import Model, Sequential\n", + "from keras.preprocessing.sequence import pad_sequences\n", + "from keras.regularizers import l2\n", + "from scipy import interp\n", + "from sklearn import metrics\n", + "from sklearn.base import clone\n", + "from sklearn.metrics import auc, classification_report, confusion_matrix, roc_curve\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.preprocessing import LabelEncoder, StandardScaler, label_binarize\n", + "from tensorflow.keras.utils import to_categorical\n", + "\n", + "sns.set_style(\"darkgrid\")\n", + "\n", + "%matplotlib inline\n", + "\n", + "print(\"OK!\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Set up conda environment\n", + "\n", + "If the above code returned any errors, then either 1. not all the required packages are installed, or 2. incorrect versions of one of more of the packages are installed.\n", + "\n", + "We recommend that you use conda to set up an environment for this submodule.\n", + "\n", + "```\n", + "# Create conda environment\n", + "conda env create -f conda_env_submodule_5_exported.yml\n", + "\n", + "# Activate the environment\n", + "conda activate nigms_sandbox_ud__submodule_5_exported\n", + "\n", + "# Register the kernel\n", + "python -m ipykernel install --user \\\n", + " --name=nigms_sandbox_ud__submodule_5_exported \\\n", + " --display-name \"Python (nigms_sandbox_ud__submodule_5_exported)\"\n", + "```\n", + "\n", + "Then, when starting the notebook, select the `Python (nigms_sandbox_ud__submodule_5_exported)` kernel from the list.\n", + "\n", + "Note that you may need to restart Jupyter Lab for these changes to take effect.\n" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +}