Avalon-Benchmark / avalon

A 3D video game environment and benchmark designed from scratch for reinforcement learning research
https://generallyintelligent.com/avalon/
GNU General Public License v3.0
181 stars 16 forks source link

Base installation instructions in the avalon/README.md for Ubuntu are not correct #31

Open dfm794 opened 1 year ago

dfm794 commented 1 year ago

Specifically, following these two lines under ubuntu will fail pip install avalon-rl python -m avalon.install_godot_binary

With this stack trace python -m avalon.install_godot_binary Traceback (most recent call last): File "/home/dfm/anaconda3/envs/avalon-rst/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/dfm/anaconda3/envs/avalon-rst/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/dfm/dev/avalon-benchmark/avalon/avalon/install_godot_binary.py", line 16, in from avalon.datagen.godot_env.interactive_godot_process import GODOT_BINARY_PATH File "/home/dfm/dev/avalon-benchmark/avalon/avalon/datagen/godot_env/interactive_godot_process.py", line 22, in from avalon.common.log_utils import log_to_sentry File "/home/dfm/dev/avalon-benchmark/avalon/avalon/common/log_utils.py", line 13, in from avalon.contrib.utils import FILESYSTEM_ROOT File "/home/dfm/dev/avalon-benchmark/avalon/avalon/contrib/utils.py", line 18, in import torch ModuleNotFoundError: No module named 'torch'

It seems that torch is not installed when installing avalon-rl. install_godot_binary uses code in utils.py, and that code imports torch for a single function that sets the random number generator seeds.

using pip install avalon-rl[train] will install torch and then the binary installation and common.check_install also succeeds.

bai-generally-intelligent commented 1 year ago

Ah yes you're right, for now please treat torch as a dependency for Avalon.