From c5af4e89aafb98af565e82d281b6b6499d424ce9 Mon Sep 17 00:00:00 2001 From: Heather Savoy <47045484+HeatherSavoy-USDA@users.noreply.github.com> Date: Sat, 9 Nov 2024 09:42:27 -0700 Subject: [PATCH 1/7] Update 20-a-ml-intro.md --- .../2024-ai-user-forum/20-a-ml-intro.md | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md index d53b4ce74..3b6c86266 100644 --- a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md +++ b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md @@ -14,3 +14,46 @@ prerequisites: Machine learning underlies the vast majority of modern AI methods, including the ever-expanding applications of deep learning and generative AI. This workshop will give participants a hands-on introduction to the basic concepts and techniques needed to understand machine learning and to apply machine learning methods to scientific research. Participants will learn how to train, evaluate, and use a variety of machine learning models for data analysis tasks. This session will also help participants critically evaluate the use and application of machine learning in science. + + +## Tutorial setup instruction + +Steps to prepare for the tutorial: + +1. **Login to Atlas Open OnDemand** at [https://atlas-ood.hpc.msstate.edu/](https://atlas-ood.hpc.msstate.edu/). For more information on login procedures for web-based SCINet access, see the [SCINet access user guide]({{site.baseurl}}/guides/access/web-based-login). + +1. **Open a command-line session** by clicking on “Clusters” -> “Atlas Shell Access” on the top menu. This will open a new tab with a command-line session on Atlas's login node. + +1. **Create and/or update your workshop working directory** and copy the tutorial materials into it by running the following commands. Note: you do not have to edit the commands with your username as it will be determined by the `$USER` variable. + + {:.copy-code} + ```bash + mkdir -p /90daydata/shared/$USER/intro_ml + cd /90daydata/shared/$USER/intro_ml + cp -r /project/ai_forum/intro_ml/intro_ml.ipynb . + ``` + +1. **Setup the kernel for JupyterLab.** You will create a kernel called *grwg_2024_env* to access from JupyterLab Server. Run the following commands to activate the workshop's virtual environment and create a new kernelspec from it: + + {:.copy-code} + ```bash + source /project/ai_forum/intro_ml/intro_ml_env/bin/activate + ipython kernel install --name "intro_ml_env" --user + ``` + +1. **Launch a JupyterLab Server session.** Under the *Interactive Apps* menu, select *JupyterLab Server*. Specify the following input values on the page: + + * Account: scinet_workshop1 + * Partition: atlas + * QOS: normal 14-00:00:00 + * Number of hours: 4 + * Number of nodes: 1 + * Number of tasks: 2 + * Additional Slurm Parameters: \-\-reservation=forum --mem=32G + * Working Directory: /90daydata/shared/${USER} + + Click *Launch*. The screen will update to the *Interactive Sessions* page. When your Jupyter session is ready, the top card will update from *Queued* to *Running* and a *Connect to JupyterLab Server* button will appear. Click *Connect to JupyterLab Server*. + +1. **Select the `intro_ml_env` kernel** for the `intro_ml.ipynb` notebook. + + From be4c00c4d5febddf5f503d0cecf507a8b907e749 Mon Sep 17 00:00:00 2001 From: Heather Savoy <47045484+HeatherSavoy-USDA@users.noreply.github.com> Date: Tue, 12 Nov 2024 22:45:13 -0700 Subject: [PATCH 2/7] fix env name --- sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md index 3b6c86266..c24127fbc 100644 --- a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md +++ b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md @@ -22,7 +22,7 @@ Steps to prepare for the tutorial: 1. **Login to Atlas Open OnDemand** at [https://atlas-ood.hpc.msstate.edu/](https://atlas-ood.hpc.msstate.edu/). For more information on login procedures for web-based SCINet access, see the [SCINet access user guide]({{site.baseurl}}/guides/access/web-based-login). -1. **Open a command-line session** by clicking on “Clusters” -> “Atlas Shell Access” on the top menu. This will open a new tab with a command-line session on Atlas's login node. +1. **Open a command-line session** by clicking on "Clusters" -> "Atlas Shell Access" on the top menu. This will open a new tab with a command-line session on Atlas's login node. 1. **Create and/or update your workshop working directory** and copy the tutorial materials into it by running the following commands. Note: you do not have to edit the commands with your username as it will be determined by the `$USER` variable. @@ -33,7 +33,7 @@ Steps to prepare for the tutorial: cp -r /project/ai_forum/intro_ml/intro_ml.ipynb . ``` -1. **Setup the kernel for JupyterLab.** You will create a kernel called *grwg_2024_env* to access from JupyterLab Server. Run the following commands to activate the workshop's virtual environment and create a new kernelspec from it: +1. **Setup the kernel for JupyterLab.** You will create a kernel called *intro_ml_env* to access from JupyterLab Server. Run the following commands to activate the workshop's virtual environment and create a new kernelspec from it: {:.copy-code} ```bash From 7c28d6ad91d593fd200e1320451354fa1d66c2af Mon Sep 17 00:00:00 2001 From: Heather Savoy <47045484+HeatherSavoy-USDA@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:44:00 -0700 Subject: [PATCH 3/7] AIUF intro ML: add interactive job instructions --- .../_workshops/2024-ai-user-forum/20-a-ml-intro.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md index c24127fbc..ac67df789 100644 --- a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md +++ b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md @@ -24,6 +24,13 @@ Steps to prepare for the tutorial: 1. **Open a command-line session** by clicking on "Clusters" -> "Atlas Shell Access" on the top menu. This will open a new tab with a command-line session on Atlas's login node. +1. **Request resources on a compute node** by running the following command: + + {:.copy-code} + ```bash + srun --reservation=forum -A scinet_workshop1 -t 00:30:00 -n 1 --mem 8G --pty bash + ``` + 1. **Create and/or update your workshop working directory** and copy the tutorial materials into it by running the following commands. Note: you do not have to edit the commands with your username as it will be determined by the `$USER` variable. {:.copy-code} @@ -41,6 +48,13 @@ Steps to prepare for the tutorial: ipython kernel install --name "intro_ml_env" --user ``` +1. **Stop the interactive job** on the compute node by running the command: + + {:.copy-code} + ```bash + exit + ``` + 1. **Launch a JupyterLab Server session.** Under the *Interactive Apps* menu, select *JupyterLab Server*. Specify the following input values on the page: * Account: scinet_workshop1 From 2988d9e2b93a12bef0b0331a44dd5b3cd1357645 Mon Sep 17 00:00:00 2001 From: Heather Savoy <47045484+HeatherSavoy-USDA@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:42:38 -0700 Subject: [PATCH 4/7] AIUF Intro ML: fix mem parameter --- sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md index ac67df789..c40967f98 100644 --- a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md +++ b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md @@ -63,7 +63,7 @@ Steps to prepare for the tutorial: * Number of hours: 4 * Number of nodes: 1 * Number of tasks: 2 - * Additional Slurm Parameters: \-\-reservation=forum --mem=32G + * Additional Slurm Parameters: \-\-reservation=forum \-\-mem=32G * Working Directory: /90daydata/shared/${USER} Click *Launch*. The screen will update to the *Interactive Sessions* page. When your Jupyter session is ready, the top card will update from *Queued* to *Running* and a *Connect to JupyterLab Server* button will appear. Click *Connect to JupyterLab Server*. From daba3e0f8e418f0979cbe64a14650c392b923b6b Mon Sep 17 00:00:00 2001 From: Heather Savoy <47045484+HeatherSavoy-USDA@users.noreply.github.com> Date: Tue, 19 Nov 2024 23:11:40 -0600 Subject: [PATCH 5/7] AIUF ML: increase cores --- sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md index c40967f98..49300080f 100644 --- a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md +++ b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md @@ -62,7 +62,7 @@ Steps to prepare for the tutorial: * QOS: normal 14-00:00:00 * Number of hours: 4 * Number of nodes: 1 - * Number of tasks: 2 + * Number of tasks: 6 * Additional Slurm Parameters: \-\-reservation=forum \-\-mem=32G * Working Directory: /90daydata/shared/${USER} From 8e5b1e626da3cc16a128d7a54f00b2780e4d4bac Mon Sep 17 00:00:00 2001 From: Brian Stucky <99272581+BrianStucky-USDA@users.noreply.github.com> Date: Wed, 20 Nov 2024 11:11:04 -0500 Subject: [PATCH 6/7] Update 20-a-ml-intro.md --- .../_workshops/2024-ai-user-forum/20-a-ml-intro.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md index 49300080f..33c96df65 100644 --- a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md +++ b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md @@ -64,10 +64,12 @@ Steps to prepare for the tutorial: * Number of nodes: 1 * Number of tasks: 6 * Additional Slurm Parameters: \-\-reservation=forum \-\-mem=32G - * Working Directory: /90daydata/shared/${USER} + * Working Directory: /90daydata/shared/${USER}/intro_ml Click *Launch*. The screen will update to the *Interactive Sessions* page. When your Jupyter session is ready, the top card will update from *Queued* to *Running* and a *Connect to JupyterLab Server* button will appear. Click *Connect to JupyterLab Server*. -1. **Select the `intro_ml_env` kernel** for the `intro_ml.ipynb` notebook. +1. **Open the `intro_ml.ipynb` notebook.** + +1. **Select the `intro_ml_env` kernel** for the notebook. From 7a006900906bda059b3216debf836abbea7c9296 Mon Sep 17 00:00:00 2001 From: "Moe.Richert" Date: Wed, 20 Nov 2024 11:49:16 -0500 Subject: [PATCH 7/7] update spacing --- .../2024-ai-user-forum/20-a-ml-intro.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md index 33c96df65..3c0c30dc3 100644 --- a/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md +++ b/sn_collections/_workshops/2024-ai-user-forum/20-a-ml-intro.md @@ -28,32 +28,32 @@ Steps to prepare for the tutorial: {:.copy-code} ```bash - srun --reservation=forum -A scinet_workshop1 -t 00:30:00 -n 1 --mem 8G --pty bash - ``` +srun --reservation=forum -A scinet_workshop1 -t 00:30:00 -n 1 --mem 8G --pty bash +``` 1. **Create and/or update your workshop working directory** and copy the tutorial materials into it by running the following commands. Note: you do not have to edit the commands with your username as it will be determined by the `$USER` variable. {:.copy-code} ```bash - mkdir -p /90daydata/shared/$USER/intro_ml - cd /90daydata/shared/$USER/intro_ml - cp -r /project/ai_forum/intro_ml/intro_ml.ipynb . - ``` +mkdir -p /90daydata/shared/$USER/intro_ml +cd /90daydata/shared/$USER/intro_ml +cp -r /project/ai_forum/intro_ml/intro_ml.ipynb . +``` 1. **Setup the kernel for JupyterLab.** You will create a kernel called *intro_ml_env* to access from JupyterLab Server. Run the following commands to activate the workshop's virtual environment and create a new kernelspec from it: {:.copy-code} ```bash - source /project/ai_forum/intro_ml/intro_ml_env/bin/activate - ipython kernel install --name "intro_ml_env" --user - ``` +source /project/ai_forum/intro_ml/intro_ml_env/bin/activate +ipython kernel install --name "intro_ml_env" --user +``` 1. **Stop the interactive job** on the compute node by running the command: {:.copy-code} ```bash - exit - ``` +exit +``` 1. **Launch a JupyterLab Server session.** Under the *Interactive Apps* menu, select *JupyterLab Server*. Specify the following input values on the page: