diff --git a/docs/Resources/prnn_tutorial.md b/docs/Resources/prnn_tutorial.md index 106b477..6b91db5 100644 --- a/docs/Resources/prnn_tutorial.md +++ b/docs/Resources/prnn_tutorial.md @@ -14,13 +14,13 @@ 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`). -5. Make the `PredictiveReplay` environment. This is done by running `make_venv.sh`. +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. - 5. `#pip3 install gym-minigrid` changed to `pip3 install -e ../../gym-minigrid-dan-fork` (this ensure we're using Dan's forked version) + 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. @@ -33,7 +33,7 @@ There are some extra steps in managing the requirements needed for the [Predicti 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` + 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.*