Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run with updated packages #2

Open
tsbertalan opened this issue Jun 29, 2022 · 1 comment
Open

Run with updated packages #2

tsbertalan opened this issue Jun 29, 2022 · 1 comment

Comments

@tsbertalan
Copy link

pyenv install 3.6.0
pyenv shell 3.6.0
python3.6 -m venv ~/.virtualenvs/rbp
source ~/.virtualenvs/rbp/bin/activate
wget https://download.pytorch.org/whl/torch-0.4.0-cp36-cp36m-linux_x86_64.whl
# Select matching torchvision from https://pypi.org/project/torchvision/
wget https://download.pytorch.org/whl/torchvision-0.4.0+cpu-cp36-cp36m-manylinux1_x86_64.whl
pip install torch-0.4.0-cp36-cp36m-linux_x86_64.whl
pip install torchvision-0.4.0+cpu-cp36-cp36m-manylinux1_x86_64.whl
pip install numpy matplotlib cffi sklearn pyaml easydict
bash setup.sh
python run_exp.py -c config/hopfield.yaml

Gives

Traceback (most recent call last):
  File "run_exp.py", line 47, in <module>
    main()
  File "run_exp.py", line 15, in main
    config = get_config(args.config_file)
  File "/home/tsbertalan/Dropbox/Projects/RBP/utils/arg_helper.py", line 38, in get_config
    config = edict(yaml.load(open(config_file, "r")))
TypeError: load() missing 1 required positional argument: 'Loader'

Installing instead the oldest pyaml I can with my pip in this env (pyaml==12.12.5) gives the same.

(rbp) tsbertalan@pico:~/Dropbox/Projects/RBP$ pip freeze
cffi==1.15.0
cycler==0.11.0
easydict==1.9
joblib==1.1.0
kiwisolver==1.3.1
matplotlib==3.3.4
numpy==1.19.5
Pillow==8.4.0
pyaml==12.12.5
pycparser==2.21
pyparsing==3.0.7
python-dateutil==2.8.2
PyYAML==6.0
scikit-learn==0.24.2
scipy==1.5.4
six==1.16.0
sklearn==0.0
threadpoolctl==3.1.0
torch==0.4.0
torchvision==0.2.2
tqdm==4.19.9
You are using pip version 9.0.1, however version 22.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I know this code is somewhat old and probably a better approach is just to use it as a guide for a newer implementation, but would it be possible to at least provide a requirements.txt so I wouldn't waste time searching for and downloading incorrect old wheels? If not, I can update the pyaml usages later.

@lrjconan
Copy link
Owner

lrjconan commented Jul 4, 2022

Thanks for your interest! Sorry that I do not have a requirements.txt for now.
You could bypass it by using yaml.load(fo.read(), Loader=yaml.FullLoader) or just install old pyyaml like 5.4.1 shown in this link.
Meanwhile, you are welcome to submit a pull request once you work out a working requirements.txt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants