From dc324d798f148244b072e25ef7d8469fd12ba899 Mon Sep 17 00:00:00 2001 From: vviggyy Date: Mon, 5 Jan 2026 12:36:14 -0500 Subject: [PATCH 01/15] fixing prnn env setup instructions --- docs/Resources/prnn_tutorial.md | 51 ++++++++++++--------------------- 1 file changed, 18 insertions(+), 33 deletions(-) diff --git a/docs/Resources/prnn_tutorial.md b/docs/Resources/prnn_tutorial.md index 106b477..0ea9f2f 100644 --- a/docs/Resources/prnn_tutorial.md +++ b/docs/Resources/prnn_tutorial.md @@ -7,43 +7,28 @@ There are some extra steps in managing the requirements needed for the [Predicti 2. See the page on HPCs for more information on this. 2. Clone the `pRNN` repository into your `project` folder (`git clone git@github.com:LevensteinLab/pRNN.git`). 3. In your `HOME` directory (accessible by typing `cd ~`): - 1. Make a folder for the virtual enviroment `mkdir venvs`. - 2. Clone Dan's fork of gym-minigrid (`git clone git@github.com:dlevenstein/gym-minigrid.git gym-minigrid-dan-fork`). -4. Create a conda environment with Python 3.9. + 1. Clone Dan's fork of gym-minigrid (`git clone git@github.com:dlevenstein/gym-minigrid.git gym-minigrid-dan-fork`). + 2. Also, clone the Farama Foundation version of minigrid. This is the most up-to-date version. (`git@github.com:Farama-Foundation/Minigrid.git`) +4. Create a conda environment (in `HOME`) with Python 3.9. 1. Misha doesn't come with Python 3.9 out of the box, and we need this version for later dependencies. 2. Type `module load miniconda` to ensure conda is loaded for use. 3. Run `conda create -n base39 python=3.9` to make an environment called `base39` with python 3.9 installed. 4. Activate it (`conda activate base39`). -5. Make the `PredictiveReplay` environment. This is done by running `make_venv.sh`. - 1. First comment out/change the following lines. This will ensure that the correct environments remain active. - 1. `module --force purge` - 2. `module load python/3.9` - 3. `virtualenv $VENV_DIR` changed to `virtualenv -p ~/.conda/envs/base39/bin/python $VENV_DIR` (this ensures we're making the virtualenv with python 3.9) - 4. Add `pip install virtualenv` before the line in step 3. - 5. `#pip3 install gym-minigrid` changed to `pip3 install -e ../../gym-minigrid-dan-fork` (this ensure we're using Dan's forked version) - 2. Run `bash make_venv.sh` to create the environment. -6. Load the environment. This is done by loading `load_venv.sh` - 1. Comment out the following lines again. This will prevent the underlying conda environment from being purged. - 1. `module --force purge` - 2. `module load python/3.9` - 2. Run `bash load_venv.sh` -7. Activate the `venv` environment. Run `source ~/venvs/PredictiveReplay_39/bin/activate`. by now you should have two parenthesized environment names by each terminal prompt, like this `(PredictiveReplay_39) (base39) [yourNetID@blahblah.misha]$ `. -8. Double check that `gym-minigrid` is installed correctly. - 1. Run `pip list | grep minigrid`. - 2. If nothing shows up, it didn't install correctly. Run `cd ~/gym-minigrid-dan-fork`, then `pip3 install -e .` to install it into the environment. -9. In your terminal (with both environments activated), run: - 1. `pip install "pip<24.1"` - 2. `pip install setuptools==59.5.0 wheel=0.37.0` - 3. `pip3 install gym==0.21.0 --no-binary :all:` -10. Rerun `bash make_venv.sh` then `bash load_venv.sh`. - 1. *Sidebar from Viggy: To be completely honest, I have no idea why steps 9 & 10 work. I spent many hours trying to fix a random numpy error that pops up in the `tutorial.ipynb`, but doing steps 9 and 10 fixes it, despite not reinstalling a different version of numpy. My hypothesis is that the downgraded version of `pip`, `setuptools`, and `wheel` help us install this version of `gym`, and when we rerun `make_venv.sh`, we can reinstall the correct version of numpy (`1.22.4` instead of `1.26.x` that it likes to do). It could be an issue with the order in which we install the packages at first. If you continue to have issues, try steps 9 and 10 again, and "turning \[your kernel\] on and off again". Or ask me, and we can figure it out. One day, I will figure out how to do this with fewer steps.* -11. Finally, make sure that the jupyter notebook kernel can recognize this environment. - 1. Run `pip install ipykernel` (this will install it inside *both* environments). - 2. Run `ipython kernel install --user --name=prnn-kernel`. To allow jupyter notebooks to pick it up. - 3. If you run `jupyter kernelspec list`, you should see `prnn-kernel` as an option. - 4. You may need to restart your VSCode or kernel here. -12. You should be able to run `tutorial.ipynb` now. This contains a single run setting up some environments. - 1. You may get a `SyntaxError`. This is because there's a small typo to fix. If you go to line 62 in `prnn > utils > Shell.py`, you may see an extra `):`. Delete that. +5. Now, we need to populate our environment with the correct packages. Some of them depend on an older version of pip, so it's important to do the steps in order. Run the following commands: + 1. `pip install "pip<24.1" setuptools==59.5.0 wheel=0.37.0` + 2. `pip install gym==0.21.0 --no-binary gym` + 3. `pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --no-cache-dir` +6. We'll also need to install the external repositories from step 3 into environment. + 1. `pip3 install -e ~/gym-minigrid-dan-fork` + 2. `pip3 install -e ~/Minigrid` +7. Lastly, install the rest of the packages, which can be done in one step with the provided `requirements.txt`. + 1. `pip install -r requirements.txt` +8. Make sure that the jupyter notebook kernel can recognize this environment. + 1. Run `ipython kernel install --user --name=prnn-kernel`. To allow jupyter notebooks to pick it up. + 2. If you run `jupyter kernelspec list`, you should see `prnn-kernel` as an option. + 3. You may need to restart your VSCode or kernel here. + 1. If you're on VSCode, you can do this fast with `Cmd + Shift + P` to open the Command Palette and then `Developer: Reload Window`. +9. You should be able to run `tutorial.ipynb` now. This contains an example training run. From d0c4b9a6ad2465e62a9ee1cfa3885faa2a88426b Mon Sep 17 00:00:00 2001 From: Andrea Cumpelik Date: Wed, 10 Dec 2025 09:04:45 -0500 Subject: [PATCH 02/15] Added missing equal sign in pip install command for wheel --- docs/Resources/prnn_tutorial.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/Resources/prnn_tutorial.md b/docs/Resources/prnn_tutorial.md index 0ea9f2f..d8d143d 100644 --- a/docs/Resources/prnn_tutorial.md +++ b/docs/Resources/prnn_tutorial.md @@ -14,6 +14,7 @@ There are some extra steps in managing the requirements needed for the [Predicti 2. Type `module load miniconda` to ensure conda is loaded for use. 3. Run `conda create -n base39 python=3.9` to make an environment called `base39` with python 3.9 installed. 4. Activate it (`conda activate base39`). +<<<<<<< HEAD 5. Now, we need to populate our environment with the correct packages. Some of them depend on an older version of pip, so it's important to do the steps in order. Run the following commands: 1. `pip install "pip<24.1" setuptools==59.5.0 wheel=0.37.0` 2. `pip install gym==0.21.0 --no-binary gym` @@ -29,6 +30,38 @@ There are some extra steps in managing the requirements needed for the [Predicti 3. You may need to restart your VSCode or kernel here. 1. If you're on VSCode, you can do this fast with `Cmd + Shift + P` to open the Command Palette and then `Developer: Reload Window`. 9. You should be able to run `tutorial.ipynb` now. This contains an example training run. +======= +5. Make the `PredictiveReplay` environment. This is done by running `make_venv.sh`, which is in the pRNN repo. + 1. First comment out/change the following lines. This will ensure that the correct environments remain active. + 1. `module --force purge` + 2. `module load python/3.9` + 3. `virtualenv $VENV_DIR` changed to `virtualenv -p ~/.conda/envs/base39/bin/python $VENV_DIR` (this ensures we're making the virtualenv with python 3.9) + 4. Add `pip install virtualenv` before the line in step 3 (line 18). + 5. In line 49, change `#pip3 install gym-minigrid` to `pip3 install -e ../../gym-minigrid-dan-fork` (this ensure we're using Dan's forked version) + 2. Run `bash make_venv.sh` to create the environment. +6. Load the environment. This is done by loading `load_venv.sh` + 1. Comment out the following lines again. This will prevent the underlying conda environment from being purged. + 1. `module --force purge` + 2. `module load python/3.9` + 2. Run `bash load_venv.sh` +7. Activate the `venv` environment. Run `source ~/venvs/PredictiveReplay_39/bin/activate`. by now you should have two parenthesized environment names by each terminal prompt, like this `(PredictiveReplay_39) (base39) [yourNetID@blahblah.misha]$ `. +8. Double check that `gym-minigrid` is installed correctly. + 1. Run `pip list | grep minigrid`. + 2. If nothing shows up, it didn't install correctly. Run `cd ~/gym-minigrid-dan-fork`, then `pip3 install -e .` to install it into the environment. +9. In your terminal (with both environments activated), run: + 1. `pip install "pip<24.1"` + 2. `pip install setuptools==59.5.0 wheel==0.37.0` + 3. `pip3 install gym==0.21.0 --no-binary :all:` +10. Rerun `bash make_venv.sh` then `bash load_venv.sh`. + 1. *Sidebar from Viggy: To be completely honest, I have no idea why steps 9 & 10 work. I spent many hours trying to fix a random numpy error that pops up in the `tutorial.ipynb`, but doing steps 9 and 10 fixes it, despite not reinstalling a different version of numpy. My hypothesis is that the downgraded version of `pip`, `setuptools`, and `wheel` help us install this version of `gym`, and when we rerun `make_venv.sh`, we can reinstall the correct version of numpy (`1.22.4` instead of `1.26.x` that it likes to do). It could be an issue with the order in which we install the packages at first. If you continue to have issues, try steps 9 and 10 again, and "turning \[your kernel\] on and off again". Or ask me, and we can figure it out. One day, I will figure out how to do this with fewer steps.* +11. Finally, make sure that the jupyter notebook kernel can recognize this environment. + 1. Run `pip install ipykernel` (this will install it inside *both* environments). + 2. Run `ipython kernel install --user --name=prnn-kernel`. To allow jupyter notebooks to pick it up. + 3. If you run `jupyter kernelspec list`, you should see `prnn-kernel` as an option. + 4. You may need to restart your VSCode or kernel here. +12. You should be able to run `tutorial.ipynb` now. This contains a single run setting up some environments. + 1. You may get a `SyntaxError`. This is because there's a small typo to fix. If you go to line 62 in `prnn > utils > Shell.py`, you may see an extra `):`. Delete that. +>>>>>>> 75cf8f2 (Added missing equal sign in pip install command for wheel) From dff2877417a1c96f62a4d344bff33993dd0e620b Mon Sep 17 00:00:00 2001 From: Andrea Cumpelik Date: Fri, 19 Dec 2025 16:50:23 +0100 Subject: [PATCH 03/15] Add instructions for using VS Code with the Misha cluster via VPN --- docs/Resources/vs_code.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/Resources/vs_code.md b/docs/Resources/vs_code.md index 925e6e5..d76d014 100644 --- a/docs/Resources/vs_code.md +++ b/docs/Resources/vs_code.md @@ -7,3 +7,12 @@ Some basic tips to get started: 4. Install the Python extension 5. Create an environment 6. Use the debugger. You can copy `Resources/debug_me.py` to try it out! If you want, you can create a new project repo that you will also use for the pytorch tutorial as part of your first project. + +To use VS Code with the cluster off-campus, you will need to use a VPN (see `Resources/hpc.md` for more information on using the cluster and `Resources/vpn.md` to configure the VPN). To connect VS Code to the Misha cluster: +1. Go to the [Misha OnDemand website](https://ood-misha.ycrc.yale.edu/). +2. Start a VS Code Proxy from the Interactive Apps section. + - Configure the proxy according to your needs (e.g. time, memory, number of cores, and type of partition) + - Launch the session. It may take a few minutes depending on how busy the cluster is + - If it's your first time using the VS Code proxy, follow the instructions listed to configure your `~/.ssh/config` file +3. Once the proxy is running, open the Command Palette in VS Code (Mac: Cmd + Shift + P; Windows: Ctrl + Shift + P) and type `Remote-SSH: Connect to Host...`, then choose `vscode-server`. +4. Complete the 2-factor authentication using Duo or a phone call (do this quickly or it will time out). If successful you should see `SSH: vscode-server` on the bottom left corner. \ No newline at end of file From f77d0f4ec143ac7e06e63857c13ae9ad8bafd723 Mon Sep 17 00:00:00 2001 From: Andrea Cumpelik Date: Fri, 19 Dec 2025 16:51:22 +0100 Subject: [PATCH 04/15] updated gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e43b0f9..4d0e806 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .DS_Store +.vscode/settings.json From e21de7becf79651ed1e54462c18687d16681a460 Mon Sep 17 00:00:00 2001 From: Andrea Cumpelik Date: Fri, 19 Dec 2025 11:23:43 -0500 Subject: [PATCH 05/15] small formatting change to VS Code/SSH instructions Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/Resources/vs_code.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Resources/vs_code.md b/docs/Resources/vs_code.md index d76d014..f95eaed 100644 --- a/docs/Resources/vs_code.md +++ b/docs/Resources/vs_code.md @@ -8,7 +8,7 @@ Some basic tips to get started: 5. Create an environment 6. Use the debugger. You can copy `Resources/debug_me.py` to try it out! If you want, you can create a new project repo that you will also use for the pytorch tutorial as part of your first project. -To use VS Code with the cluster off-campus, you will need to use a VPN (see `Resources/hpc.md` for more information on using the cluster and `Resources/vpn.md` to configure the VPN). To connect VS Code to the Misha cluster: +To use VS Code with the cluster off campus, you will need to use a VPN (see `Resources/hpc.md` for more information on using the cluster and `Resources/vpn.md` to configure the VPN). To connect VS Code to the Misha cluster: 1. Go to the [Misha OnDemand website](https://ood-misha.ycrc.yale.edu/). 2. Start a VS Code Proxy from the Interactive Apps section. - Configure the proxy according to your needs (e.g. time, memory, number of cores, and type of partition) From 7395fc8711352b312718cc2c14392f6e00a5c270 Mon Sep 17 00:00:00 2001 From: Dan Levenstein Date: Fri, 19 Dec 2025 17:58:06 -0500 Subject: [PATCH 06/15] Update pRNN cloning instructions with watch note Added a note to watch the pRNN repository for updates. --- docs/Resources/prnn_tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Resources/prnn_tutorial.md b/docs/Resources/prnn_tutorial.md index d8d143d..2ef0f29 100644 --- a/docs/Resources/prnn_tutorial.md +++ b/docs/Resources/prnn_tutorial.md @@ -5,7 +5,7 @@ There are some extra steps in managing the requirements needed for the [Predicti 1. Ensure you have an account on Misha, and log on. Make sure to allocate an interactive session (e.g. `salloc -t 2:00:00`)! 1. Make sure you've also set up SSH cloning from the cluster, because you'll need to clone repositories into your storage. We're using SSH clone links from here out. 2. See the page on HPCs for more information on this. -2. Clone the `pRNN` repository into your `project` folder (`git clone git@github.com:LevensteinLab/pRNN.git`). +2. Clone the `pRNN` repository into your `project` folder (`git clone git@github.com:LevensteinLab/pRNN.git`), 👀watch the repository so you can be notified of any updates. 3. In your `HOME` directory (accessible by typing `cd ~`): 1. Clone Dan's fork of gym-minigrid (`git clone git@github.com:dlevenstein/gym-minigrid.git gym-minigrid-dan-fork`). 2. Also, clone the Farama Foundation version of minigrid. This is the most up-to-date version. (`git@github.com:Farama-Foundation/Minigrid.git`) From bd14ba9e9b232b61522a9d6cba9d025992e12085 Mon Sep 17 00:00:00 2001 From: Dan Levenstein Date: Fri, 19 Dec 2025 17:58:53 -0500 Subject: [PATCH 07/15] Update emoji in pRNN tutorial MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated emoji from '👀' to '👁️' for consistency. --- docs/Resources/prnn_tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Resources/prnn_tutorial.md b/docs/Resources/prnn_tutorial.md index 2ef0f29..29cc0da 100644 --- a/docs/Resources/prnn_tutorial.md +++ b/docs/Resources/prnn_tutorial.md @@ -5,7 +5,7 @@ There are some extra steps in managing the requirements needed for the [Predicti 1. Ensure you have an account on Misha, and log on. Make sure to allocate an interactive session (e.g. `salloc -t 2:00:00`)! 1. Make sure you've also set up SSH cloning from the cluster, because you'll need to clone repositories into your storage. We're using SSH clone links from here out. 2. See the page on HPCs for more information on this. -2. Clone the `pRNN` repository into your `project` folder (`git clone git@github.com:LevensteinLab/pRNN.git`), 👀watch the repository so you can be notified of any updates. +2. Clone the `pRNN` repository into your `project` folder (`git clone git@github.com:LevensteinLab/pRNN.git`), and 👁️watch the repository so you can be notified of any updates. 3. In your `HOME` directory (accessible by typing `cd ~`): 1. Clone Dan's fork of gym-minigrid (`git clone git@github.com:dlevenstein/gym-minigrid.git gym-minigrid-dan-fork`). 2. Also, clone the Farama Foundation version of minigrid. This is the most up-to-date version. (`git@github.com:Farama-Foundation/Minigrid.git`) From 87f1f5efb3288a48826f168b3437233157bd38b9 Mon Sep 17 00:00:00 2001 From: Dan Levenstein Date: Fri, 19 Dec 2025 18:02:45 -0500 Subject: [PATCH 08/15] Create funding.md with postdoc fellowship resources Added a section for postdoc fellowships with a link to funding opportunities. --- docs/Resources/funding.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 docs/Resources/funding.md diff --git a/docs/Resources/funding.md b/docs/Resources/funding.md new file mode 100644 index 0000000..c8db600 --- /dev/null +++ b/docs/Resources/funding.md @@ -0,0 +1,6 @@ +**Postdoc fellowships** + +Many postdoc fellowships can be found here, along with the time you should try to apply: +- [https://research-development.zuckermaninstitute.columbia.edu/content/postdoctoral-funding-opportunities](https://research-development.zuckermaninstitute.columbia.edu/content/postdoctoral-funding-opportunities) + +Please add to this list as you find more that may be appropriate for the lab From a3c47fa237a9b8d625737780106b07d65f8e298a Mon Sep 17 00:00:00 2001 From: Dan Levenstein Date: Fri, 19 Dec 2025 18:18:19 -0500 Subject: [PATCH 09/15] Revise recommended reading in resources Updated recommended reading list with new references on sleep and memory consolidation. --- docs/Resources/recommended_reading.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/Resources/recommended_reading.md b/docs/Resources/recommended_reading.md index 14d9104..5b00092 100644 --- a/docs/Resources/recommended_reading.md +++ b/docs/Resources/recommended_reading.md @@ -4,19 +4,20 @@ **Sleep** -- https://pubmed.ncbi.nlm.nih.gov/23589831/ -- https://journals.physiology.org/doi/abs/10.1152/physrev.00054.2024 -- https://www.nature.com/articles/nrn2762 -- [https://www.cell.com/neuron/fulltext/S0896-6273(23)00201-5](https://www.cell.com/neuron/fulltext/S0896-6273(23)00201-5) -- https://www.sciencedirect.com/science/article/pii/S0896627304005409 +- [Sleep-dependent memory consolidation](https://www.sciencedirect.com/science/article/pii/S0896627304005409), Stickgold R, 2005, Nature +- [The memory function of sleep](https://www.nature.com/articles/nrn2762), Diekelmann S & Born J, 2010, Nat Rev Neurosci +- [Overlapping memory replay during sleep builds cognitive schemata](https://www.sciencedirect.com/science/article/pii/S1364661311001094), Lewis PA & Durrant SJ, 2011, Trends Cogn Sci +- [About sleep’s role in memory](https://pubmed.ncbi.nlm.nih.gov/23589831/), Rasch B & Born J, 2013, Physiol Rev +- [Sleep and synaptic plasticity in the developing and adult brain](https://link.springer.com/chapter/10.1007/7854_2014_305), Frank MG, 2014, Curr Top Behav Neurosci +- [Mechanisms of systems memory consolidation during sleep](https://www.nature.com/articles/s41593-019-0467-3), Klinzing JG et al, 2019, Nat Neurosci +- [Experience and sleep-dependent synaptic plasticity: from structure to activity](https://royalsocietypublishing.org/rstb/article/375/1799/20190234/23743/Experience-and-sleep-dependent-synaptic-plasticity), Sun L et al, 2020, Philos Trans R Soc B +- [Sleep — a brain state serving systems memory consolidation](https://www.sciencedirect.com/science/article/pii/S0896627323002015), Brodt S et al, 2023, Neuron +- [Sleep’s contribution to memory formation](https://journals.physiology.org/doi/abs/10.1152/physrev.00054.2024), Lutz ND et al, 2026, Physiol Rev **Memory consolidation** -- https://pubmed.ncbi.nlm.nih.gov/7624455/ -- https://www.nature.com/articles/nrn2762 -- https://pubmed.ncbi.nlm.nih.gov/21764357/ -- [https://www.cell.com/neuron/fulltext/S0896-6273(23)00201-5](https://www.cell.com/neuron/fulltext/S0896-6273(23)00201-5) -- https://www.sciencedirect.com/science/article/pii/S0896627304005409 +- [Why there are complementary learning systems in the hippocampus and neocortex: insights from the successes and failures of connectionist models of learning and memory](https://pubmed.ncbi.nlm.nih.gov/7624455/), McClelland JL et al, 1995, Psychol Rev + **Artificial Neural Networks (ANNs)** From d8a1b926308db310c0866081f0eae145dc0c1d05 Mon Sep 17 00:00:00 2001 From: Dan Levenstein Date: Fri, 19 Dec 2025 18:34:57 -0500 Subject: [PATCH 10/15] Add Fellowships/Grants resource to mkdocs.yml --- mkdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs.yml b/mkdocs.yml index e28e45c..9dcc426 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,6 +12,7 @@ nav: - Adobe: Resources/adobe.md - Basic Github: Resources/basic_github.md - Booking Rooms: Resources/booking.md + - Fellowships/Grants: Resources/funding.md - GenAI: Resources/gen_ai.md - HPC: Resources/hpc.md - Mailing Lists: Resources/mailing_lists.md From af63957c4317e757499eac68864249ad56f5ab0e Mon Sep 17 00:00:00 2001 From: Vignesh Vanchinathan <35017554+vviggyy@users.noreply.github.com> Date: Mon, 5 Jan 2026 15:38:44 -0500 Subject: [PATCH 11/15] Revise pRNN tutorial for directory and kernel setup Updated directory references and installation instructions for clarity. --- docs/Resources/prnn_tutorial.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/Resources/prnn_tutorial.md b/docs/Resources/prnn_tutorial.md index 35ad346..51c17b4 100644 --- a/docs/Resources/prnn_tutorial.md +++ b/docs/Resources/prnn_tutorial.md @@ -6,10 +6,10 @@ There are some extra steps in managing the requirements needed for the [Predicti 1. Make sure you've also set up SSH cloning from the cluster, because you'll need to clone repositories into your storage. We're using SSH clone links from here out. 2. See the page on HPCs for more information on this. 2. Clone the `pRNN` repository into your `project` folder (`git clone git@github.com:LevensteinLab/pRNN.git`), and 👁️watch the repository so you can be notified of any updates. -3. In your `HOME` directory (accessible by typing `cd ~`): +3. In your `project` directory (accessible by typing `cd ~/project`): 1. Clone Dan's fork of gym-minigrid (`git clone git@github.com:dlevenstein/gym-minigrid.git gym-minigrid-dan-fork`). 2. Also, clone the Farama Foundation version of minigrid. This is the most up-to-date version. (`git@github.com:Farama-Foundation/Minigrid.git`) -4. Create a conda environment (in `HOME`) with Python 3.9. +4. Create a conda environment with Python 3.9. 1. Misha doesn't come with Python 3.9 out of the box, and we need this version for later dependencies. 2. Type `module load miniconda` to ensure conda is loaded for use. 3. Run `conda create -n base39 python=3.9` to make an environment called `base39` with python 3.9 installed. @@ -19,13 +19,11 @@ There are some extra steps in managing the requirements needed for the [Predicti 2. `pip install gym==0.21.0 --no-binary gym` 3. `pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --no-cache-dir` 6. We'll also need to install the external repositories from step 3 into environment. - 1. `pip3 install -e ~/gym-minigrid-dan-fork` - 2. `pip3 install -e ~/Minigrid` -7. Lastly, install the rest of the packages, which can be done in one step with the provided `requirements.txt`. - 1. `pip install -r requirements.txt` -8. Make sure that the jupyter notebook kernel can recognize this environment. - 1. Run `ipython kernel install --user --name=prnn-kernel`. To allow jupyter notebooks to pick it up. - 2. If you run `jupyter kernelspec list`, you should see `prnn-kernel` as an option. + 1. `pip3 install -e ~/project/gym-minigrid-dan-fork` + 2. `pip3 install -e ~/project/Minigrid` +7. Make sure that the jupyter notebook kernel can recognize this environment. + 1. Run `ipython kernel install --user --name=prnn-tutorial`. To allow jupyter notebooks to pick it up. + 2. If you run `jupyter kernelspec list`, you should see `prnn-tutorial` as an option. 3. You may need to restart your VSCode or kernel here. 1. If you're on VSCode, you can do this fast with `Cmd + Shift + P` to open the Command Palette and then `Developer: Reload Window`. -9. You should be able to run `tutorial.ipynb` now. This contains an example training run. \ No newline at end of file +8. Your environment should be all set to run example code provided with the package, or to start going through the tutorials. The quickstart tutorial can be found [here](https://github.com/LevensteinLab/pRNN/blob/main/docs/quickstart.rst). This contains an example training run. From 9ecd7eca640e662ebd50f906891bf84153adac47 Mon Sep 17 00:00:00 2001 From: Vignesh Vanchinathan <35017554+vviggyy@users.noreply.github.com> Date: Mon, 5 Jan 2026 15:41:33 -0500 Subject: [PATCH 12/15] Update conda environment setup instructions --- docs/Resources/prnn_tutorial.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/Resources/prnn_tutorial.md b/docs/Resources/prnn_tutorial.md index 51c17b4..166e107 100644 --- a/docs/Resources/prnn_tutorial.md +++ b/docs/Resources/prnn_tutorial.md @@ -12,8 +12,8 @@ There are some extra steps in managing the requirements needed for the [Predicti 4. Create a conda environment with Python 3.9. 1. Misha doesn't come with Python 3.9 out of the box, and we need this version for later dependencies. 2. Type `module load miniconda` to ensure conda is loaded for use. - 3. Run `conda create -n base39 python=3.9` to make an environment called `base39` with python 3.9 installed. - 4. Activate it (`conda activate base39`). + 3. Run `conda create -n prnn_tutorial python=3.9` to make an environment called `prnn_tutorial` with python 3.9 installed. + 4. Activate it (`conda activate prnn_tutorial`). 5. Now, we need to populate our environment with the correct packages. Some of them depend on an older version of pip, so it's important to do the steps in order. Run the following commands: 1. `pip install "pip<24.1" setuptools==59.5.0 wheel=0.37.0` 2. `pip install gym==0.21.0 --no-binary gym` @@ -22,8 +22,8 @@ There are some extra steps in managing the requirements needed for the [Predicti 1. `pip3 install -e ~/project/gym-minigrid-dan-fork` 2. `pip3 install -e ~/project/Minigrid` 7. Make sure that the jupyter notebook kernel can recognize this environment. - 1. Run `ipython kernel install --user --name=prnn-tutorial`. To allow jupyter notebooks to pick it up. - 2. If you run `jupyter kernelspec list`, you should see `prnn-tutorial` as an option. + 1. Run `ipython kernel install --user --name=prnn_tutorial`. To allow jupyter notebooks to pick it up. + 2. If you run `jupyter kernelspec list`, you should see `prnn_tutorial` as an option. 3. You may need to restart your VSCode or kernel here. 1. If you're on VSCode, you can do this fast with `Cmd + Shift + P` to open the Command Palette and then `Developer: Reload Window`. 8. Your environment should be all set to run example code provided with the package, or to start going through the tutorials. The quickstart tutorial can be found [here](https://github.com/LevensteinLab/pRNN/blob/main/docs/quickstart.rst). This contains an example training run. From c07a2871fb011c2c5e70bf9e8d3ad6351637f99e Mon Sep 17 00:00:00 2001 From: Vignesh Vanchinathan <35017554+vviggyy@users.noreply.github.com> Date: Mon, 5 Jan 2026 17:54:36 -0500 Subject: [PATCH 13/15] update project folder path and added extra steps for reqs --- docs/Resources/prnn_tutorial.md | 35 +++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/docs/Resources/prnn_tutorial.md b/docs/Resources/prnn_tutorial.md index 166e107..183751a 100644 --- a/docs/Resources/prnn_tutorial.md +++ b/docs/Resources/prnn_tutorial.md @@ -5,25 +5,34 @@ There are some extra steps in managing the requirements needed for the [Predicti 1. Ensure you have an account on Misha, and log on. Make sure to allocate an interactive session (e.g. `salloc -t 2:00:00`)! 1. Make sure you've also set up SSH cloning from the cluster, because you'll need to clone repositories into your storage. We're using SSH clone links from here out. 2. See the page on HPCs for more information on this. -2. Clone the `pRNN` repository into your `project` folder (`git clone git@github.com:LevensteinLab/pRNN.git`), and 👁️watch the repository so you can be notified of any updates. -3. In your `project` directory (accessible by typing `cd ~/project`): - 1. Clone Dan's fork of gym-minigrid (`git clone git@github.com:dlevenstein/gym-minigrid.git gym-minigrid-dan-fork`). - 2. Also, clone the Farama Foundation version of minigrid. This is the most up-to-date version. (`git@github.com:Farama-Foundation/Minigrid.git`) -4. Create a conda environment with Python 3.9. +2. Clone the `pRNN` package into your `project` folder. This is accessible by typing `cd ~/../../project/levenstein/YOUR_NETID/`. This brings you to the `/gpfs/radev/project/levenstein/YOUR_NETID`. + 1. `git clone git@github.com:LevensteinLab/pRNN.git` + 2. 👁️ Watch the repository so you can be notified of any updates! +4. Also clone these external repositories into that project directory: + 1. Dan's fork of gym-minigrid (`git clone git@github.com:dlevenstein/gym-minigrid.git gym-minigrid-dan-fork`). + 2. Farama Foundation version of minigrid. This is the most up-to-date version. (`git clone git@github.com:Farama-Foundation/Minigrid.git`) +5. In the same folder, create your own separate repo for your project work. We recommend using a template such as Patrick Mineault's `true-neutral-cookiecutter` to model the repository after. + 1. `pip install cookiecutter` + 2. `cookiecutter gh:patrickmineault/true-neutral-cookiecutter` + 3. It will prompt you for input regarding the name of the repository. +6. Create a conda environment with Python 3.9. 1. Misha doesn't come with Python 3.9 out of the box, and we need this version for later dependencies. 2. Type `module load miniconda` to ensure conda is loaded for use. 3. Run `conda create -n prnn_tutorial python=3.9` to make an environment called `prnn_tutorial` with python 3.9 installed. 4. Activate it (`conda activate prnn_tutorial`). -5. Now, we need to populate our environment with the correct packages. Some of them depend on an older version of pip, so it's important to do the steps in order. Run the following commands: - 1. `pip install "pip<24.1" setuptools==59.5.0 wheel=0.37.0` +7. Now, we need to populate our environment with the correct packages. Some of them depend on an older version of pip, so it's important to do the steps in order. Run the following commands: + 1. `pip install "pip<24.1" setuptools==59.5.0 wheel==0.37.0` 2. `pip install gym==0.21.0 --no-binary gym` 3. `pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --no-cache-dir` -6. We'll also need to install the external repositories from step 3 into environment. +8. We'll also need to install the external repositories from step 3 into environment. 1. `pip3 install -e ~/project/gym-minigrid-dan-fork` 2. `pip3 install -e ~/project/Minigrid` -7. Make sure that the jupyter notebook kernel can recognize this environment. - 1. Run `ipython kernel install --user --name=prnn_tutorial`. To allow jupyter notebooks to pick it up. - 2. If you run `jupyter kernelspec list`, you should see `prnn_tutorial` as an option. - 3. You may need to restart your VSCode or kernel here. +9. Install the `pRNN` package itself into the environment. + 1. Navigate to the repository, then `pip install -e .` +8. Make sure that the jupyter notebook kernel can recognize this environment. + 1. `pip install ipykernel` + 2. Run `ipython kernel install --user --name=prnn_tutorial`. To allow jupyter notebooks to pick it up. + 3. If you run `jupyter kernelspec list`, you should see `prnn_tutorial` as an option. + 4. You may need to restart your VSCode or kernel here. 1. If you're on VSCode, you can do this fast with `Cmd + Shift + P` to open the Command Palette and then `Developer: Reload Window`. -8. Your environment should be all set to run example code provided with the package, or to start going through the tutorials. The quickstart tutorial can be found [here](https://github.com/LevensteinLab/pRNN/blob/main/docs/quickstart.rst). This contains an example training run. +9. Your environment should be all set to run example code provided with the package, or to start going through the tutorials. The quickstart tutorial can be found [here](https://github.com/LevensteinLab/pRNN/blob/main/docs/quickstart.rst). This contains an example training run. From c1111db01c9ce5a0c4e4cd97bedd86ae3b4248c0 Mon Sep 17 00:00:00 2001 From: Vignesh Vanchinathan <35017554+vviggyy@users.noreply.github.com> Date: Tue, 6 Jan 2026 12:45:29 -0500 Subject: [PATCH 14/15] changing paths and adding additional note about vscode --- docs/Resources/prnn_tutorial.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/Resources/prnn_tutorial.md b/docs/Resources/prnn_tutorial.md index 183751a..bb44cb4 100644 --- a/docs/Resources/prnn_tutorial.md +++ b/docs/Resources/prnn_tutorial.md @@ -2,37 +2,40 @@ There are some extra steps in managing the requirements needed for the [Predictive RNN](https://github.com/LevensteinLab/pRNN) project. This guide should help you get everything set up on Misha. -1. Ensure you have an account on Misha, and log on. Make sure to allocate an interactive session (e.g. `salloc -t 2:00:00`)! +1. Ensure you have an account on Misha, and log on. + 1. Make sure to allocate an interactive session (e.g. `salloc -t 2:00:00`)! + 2. If are using the VS Code Proxy (as described on the [vs_code.md](https://levensteinlab.github.io/Lab-Handbook/Resources/vs_code/) page), you're already on a compute node. 1. Make sure you've also set up SSH cloning from the cluster, because you'll need to clone repositories into your storage. We're using SSH clone links from here out. 2. See the page on HPCs for more information on this. -2. Clone the `pRNN` package into your `project` folder. This is accessible by typing `cd ~/../../project/levenstein/YOUR_NETID/`. This brings you to the `/gpfs/radev/project/levenstein/YOUR_NETID`. +3. Clone the `pRNN` package into your `project` folder. This is accessible by typing `cd ~/../../project/levenstein/YOUR_NETID/`. This brings you to the `/gpfs/radev/project/levenstein/YOUR_NETID`. 1. `git clone git@github.com:LevensteinLab/pRNN.git` 2. 👁️ Watch the repository so you can be notified of any updates! 4. Also clone these external repositories into that project directory: 1. Dan's fork of gym-minigrid (`git clone git@github.com:dlevenstein/gym-minigrid.git gym-minigrid-dan-fork`). 2. Farama Foundation version of minigrid. This is the most up-to-date version. (`git clone git@github.com:Farama-Foundation/Minigrid.git`) -5. In the same folder, create your own separate repo for your project work. We recommend using a template such as Patrick Mineault's `true-neutral-cookiecutter` to model the repository after. - 1. `pip install cookiecutter` - 2. `cookiecutter gh:patrickmineault/true-neutral-cookiecutter` - 3. It will prompt you for input regarding the name of the repository. -6. Create a conda environment with Python 3.9. +5. Create a conda environment with Python 3.9. 1. Misha doesn't come with Python 3.9 out of the box, and we need this version for later dependencies. 2. Type `module load miniconda` to ensure conda is loaded for use. 3. Run `conda create -n prnn_tutorial python=3.9` to make an environment called `prnn_tutorial` with python 3.9 installed. 4. Activate it (`conda activate prnn_tutorial`). +6. In the project folder, create your own separate repo for your work. We recommend using a template such as Patrick Mineault's `true-neutral-cookiecutter` to model the repository after. + 1. `pip install cookiecutter` + 2. `cookiecutter gh:patrickmineault/true-neutral-cookiecutter` + 3. It will prompt you for input regarding the name of the repository. 7. Now, we need to populate our environment with the correct packages. Some of them depend on an older version of pip, so it's important to do the steps in order. Run the following commands: 1. `pip install "pip<24.1" setuptools==59.5.0 wheel==0.37.0` 2. `pip install gym==0.21.0 --no-binary gym` 3. `pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --no-cache-dir` 8. We'll also need to install the external repositories from step 3 into environment. - 1. `pip3 install -e ~/project/gym-minigrid-dan-fork` - 2. `pip3 install -e ~/project/Minigrid` + 1. `pip3 install -e ~/../../project/levenstein/YOUR_NETID/gym-minigrid-dan-fork` + 2. `pip3 install -e ~/../../project/levenstein/YOUR_NETID/Minigrid` 9. Install the `pRNN` package itself into the environment. 1. Navigate to the repository, then `pip install -e .` -8. Make sure that the jupyter notebook kernel can recognize this environment. +10. Make sure that the jupyter notebook kernel can recognize this environment. 1. `pip install ipykernel` 2. Run `ipython kernel install --user --name=prnn_tutorial`. To allow jupyter notebooks to pick it up. 3. If you run `jupyter kernelspec list`, you should see `prnn_tutorial` as an option. 4. You may need to restart your VSCode or kernel here. 1. If you're on VSCode, you can do this fast with `Cmd + Shift + P` to open the Command Palette and then `Developer: Reload Window`. -9. Your environment should be all set to run example code provided with the package, or to start going through the tutorials. The quickstart tutorial can be found [here](https://github.com/LevensteinLab/pRNN/blob/main/docs/quickstart.rst). This contains an example training run. +11. Your environment should be all set to run example code provided with the package, or to start going through the tutorials. The quickstart tutorial can be found [here](https://github.com/LevensteinLab/pRNN/blob/main/docs/quickstart.rst). This contains an example training run. + 1. If you would like to run through quickstart interactively, you will need to copy `pRNN/examples/tutorial.ipynb` to your `prnn_tutorial` folder. This can be done with `rsync -r ../pRNN/examples/ .` From 89acae50b87b969c150dae08dcdac6965a762942 Mon Sep 17 00:00:00 2001 From: Vignesh Vanchinathan <35017554+vviggyy@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:40:36 -0500 Subject: [PATCH 15/15] merged instructions 1i and 1ii Consolidate steps for managing requirements on Misha. --- docs/Resources/prnn_tutorial.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/Resources/prnn_tutorial.md b/docs/Resources/prnn_tutorial.md index bb44cb4..7e19ec6 100644 --- a/docs/Resources/prnn_tutorial.md +++ b/docs/Resources/prnn_tutorial.md @@ -3,10 +3,9 @@ There are some extra steps in managing the requirements needed for the [Predictive RNN](https://github.com/LevensteinLab/pRNN) project. This guide should help you get everything set up on Misha. 1. Ensure you have an account on Misha, and log on. - 1. Make sure to allocate an interactive session (e.g. `salloc -t 2:00:00`)! - 2. If are using the VS Code Proxy (as described on the [vs_code.md](https://levensteinlab.github.io/Lab-Handbook/Resources/vs_code/) page), you're already on a compute node. - 1. Make sure you've also set up SSH cloning from the cluster, because you'll need to clone repositories into your storage. We're using SSH clone links from here out. - 2. See the page on HPCs for more information on this. + 1. Make sure to allocate an interactive session (e.g. `salloc -t 2:00:00`)! If are using the VS Code Proxy (as described on the [vs_code.md](https://levensteinlab.github.io/Lab-Handbook/Resources/vs_code/) page), you're already on a compute node. + 2. Make sure you've also set up SSH cloning from the cluster, because you'll need to clone repositories into your storage. We're using SSH clone links from here out. + 3. See the page on HPCs for more information on this. 3. Clone the `pRNN` package into your `project` folder. This is accessible by typing `cd ~/../../project/levenstein/YOUR_NETID/`. This brings you to the `/gpfs/radev/project/levenstein/YOUR_NETID`. 1. `git clone git@github.com:LevensteinLab/pRNN.git` 2. 👁️ Watch the repository so you can be notified of any updates!