Closed Matoi647 closed 8 months ago
Hey! Thanks for the PR. Indeed PyTorch 1.9 is not available in the default repos anymore (you have to look at the list of previous versions for the link).
It was pinned as, sometimes, PyTorch changes the logic underneath some of the modules, which could change the results of the model. This is unlikely, but added as a safety precaution.
Given how this could sneakily affect performance of the model for anybody running it down the line, I would like to do one of the following:
1) Exhaustive benchmark of the performance of the model with 1.9 vs. 2.2 (or other PyTorch version). Primarly, running the diamond pickaxe model for, say, 1000 episodes for both, and seeing if the results are still the same. Alternatively,
2) Keep torch==1.9
pin but add the URL to look for it to the requirements.txt
. I believe there are ways to do this, so that you can still install with pip install -r requirements.txt
and the requirements.txt
file specifies where to look for that specific package. We can add a note that people can try using newer torch, but with a cautious reminder that it might change how the model behaves.
For the second option, I've tried to manually install torch 1.9.0 form this URL: https://download.pytorch.org/whl/cu111/torch-1.9.0%2Bcu111-cp39-cp39-linux_x86_64.whl But it still failed because the latest version of Python that supports torch 1.9.0 is Python 3.9. So it's not compatible with Python 3.10, mabye you should also add a note of Python version.
Ah yes good catch. The solution in #39 is the correct one for now. Thanks for reporting this and taking the time to write the PRs :).
Closing as resolved.
I've noticed a fixed constraint in the
requirements.txt
file specifyingtorch==1.9.0
. However, I'm using Python 3.10 and CUDA 11.5, which is incompatible with torch 1.9.0. When I ranpip install -r requirements.txt
, I encountered the following error:Therefore, I manually installed the latest version of torch (2.2.1), and it works perfectly. Perhaps the constraint on the torch version is unnecessary. Removing the specific version constraint would allow users to install the latest compatible version.