hijkzzz / pymarl2

Fine-tuned MARL algorithms on SMAC (100% win rates on most scenarios)
https://iclr-blogposts.github.io/2023/blog/2023/riit/
Apache License 2.0
633 stars 124 forks source link

[Help]pysc2.lib.remote_controller.ConnectError: Failed to connect to the SC2 websocket. Is it up? #7

Closed jsrimr closed 3 years ago

jsrimr commented 3 years ago

When I run command

python3 src/main.py --config=qmix --env-config=sc2 with env_args.map_name=corridor

I encounter this error.

Traceback (most recent call last):
  File "src/main.py", line 109, in <module>
    ex.run_commandline(params)
  File "/opt/conda/envs/pymarl/lib/python3.7/site-packages/sacred/experiment.py", line 318, in run_commandline
    options=args,
  File "/opt/conda/envs/pymarl/lib/python3.7/site-packages/sacred/experiment.py", line 276, in run
    run()
  File "/opt/conda/envs/pymarl/lib/python3.7/site-packages/sacred/run.py", line 238, in __call__
    self.result = self.main_function(*args)
  File "/opt/conda/envs/pymarl/lib/python3.7/site-packages/sacred/config/captured_function.py", line 42, in captured_function
    result = wrapped(*args, **kwargs)
  File "src/main.py", line 35, in my_main
    run_REGISTRY[_config['run']](_run, config, _log)
  File "/root/pymarl2/src/run/run.py", line 54, in run
    run_sequential(args=args, logger=logger)
  File "/root/pymarl2/src/run/run.py", line 177, in run_sequential
    episode_batch = runner.run(test_mode=False)
  File "/root/pymarl2/src/runners/parallel_runner.py", line 89, in run
    self.reset()
  File "/root/pymarl2/src/runners/parallel_runner.py", line 78, in reset
    data = parent_conn.recv()
  File "/opt/conda/envs/pymarl/lib/python3.7/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
  File "/opt/conda/envs/pymarl/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
    buf = self._recv(4)
  File "/opt/conda/envs/pymarl/lib/python3.7/multiprocessing/connection.py", line 379, in _recv
    chunk = read(handle, remaining)
KeyboardInterrupt

Here(https://github.com/deepmind/pysc2/issues/281) says I have to open the Starcraft2 game as well instead of just open the battle net, but I don't know how to open them.

Could you give any advices?

hijkzzz commented 3 years ago

It seems to be a problem from StarCraft 2. To ensure compatibility, please use our installing shell script under Ubuntu. Thanks~

jsrimr commented 3 years ago

Well, I follwed the instructions like

bash install_sc2.sh
bash install_dependencies.sh

and there comes message "StarCraft II and SMAC are installed"

image

Do you have any other idea? It'd be a huge help. Thx!

hijkzzz commented 3 years ago

Hi, please remove all the file. and reinstall all things~ Thanks. In addition, please use Ubuntu.

jsrimr commented 3 years ago

Hi, I removed and reinstalled, but nothing changed.

I am using ubuntu docker but somehow the program installs some MACOSX thing.. Do you have any idea?

image

hijkzzz commented 3 years ago

maybe, you should use nvidia-docker. the dockerfile https://github.com/oxwhirl/pymarl/blob/master/docker/Dockerfile