uoe-agents / epymarl

An extension of the PyMARL codebase that includes additional algorithms and environment support
Apache License 2.0
465 stars 135 forks source link

error running example rware/lbforaging #18

Closed kinalmehta closed 2 years ago

kinalmehta commented 2 years ago

Command run:

python src/main.py --config=qmix --env-config=gymma with env_args.time_limit=500 env_args.key="rware:rware-tiny-2ag-v1"

Error:

Traceback (most recent call last):
  File "/home/kinal/miniconda3/envs/epymarl/lib/python3.9/site-packages/sacred/experiment.py", line 312, in run_commandline
    return self.run(
  File "/home/kinal/miniconda3/envs/epymarl/lib/python3.9/site-packages/sacred/experiment.py", line 276, in run
    run()
  File "/home/kinal/miniconda3/envs/epymarl/lib/python3.9/site-packages/sacred/run.py", line 238, in __call__
    self.result = self.main_function(*args)
  File "/home/kinal/miniconda3/envs/epymarl/lib/python3.9/site-packages/sacred/config/captured_function.py", line 42, in captured_function
    result = wrapped(*args, **kwargs)
  File "/home/kinal/Desktop/marl/quick_results/epymarl/src/main.py", line 36, in my_main
    run(_run, config, _log)
  File "/home/kinal/Desktop/marl/quick_results/epymarl/src/run.py", line 55, in run
    run_sequential(args=args, logger=logger)
  File "/home/kinal/Desktop/marl/quick_results/epymarl/src/run.py", line 87, in run_sequential
    runner = r_REGISTRY[args.runner](args=args, logger=logger)
  File "/home/kinal/Desktop/marl/quick_results/epymarl/src/runners/episode_runner.py", line 15, in __init__
    self.env = env_REGISTRY[self.args.env](**self.args.env_args)
  File "/home/kinal/Desktop/marl/quick_results/epymarl/src/envs/__init__.py", line 17, in env_fn
    return env(**kwargs)
  File "/home/kinal/Desktop/marl/quick_results/epymarl/src/envs/__init__.py", line 84, in __init__
    self._env = TimeLimit(gym.make(f"{key}"), max_episode_steps=time_limit)
  File "/home/kinal/miniconda3/envs/epymarl/lib/python3.9/site-packages/gym/envs/registration.py", line 676, in make
    return registry.make(id, **kwargs)
  File "/home/kinal/miniconda3/envs/epymarl/lib/python3.9/site-packages/gym/envs/registration.py", line 490, in make
    versions = self.env_specs.versions(namespace, name)
  File "/home/kinal/miniconda3/envs/epymarl/lib/python3.9/site-packages/gym/envs/registration.py", line 220, in versions
    self._assert_name_exists(namespace, name)
  File "/home/kinal/miniconda3/envs/epymarl/lib/python3.9/site-packages/gym/envs/registration.py", line 297, in _assert_name_exists
    raise error.NameNotFound(message)
gym.error.NameNotFound: Environment `rware:rware-tiny-2ag` doesn't exist. Did you mean: `rware-tiny-2ag`?

During handling of the above exception, another exception occurred:

Environment: python 3.9

Package            Version
------------------ --------------
absl-py            0.5.0
atomicwrites       1.2.1
attrs              21.4.0
brotlipy           0.7.0
certifi            2018.8.24
cffi               1.15.0
chardet            3.0.4
charset-normalizer 2.0.4
cloudpickle        2.0.0
colorama           0.4.4
cryptography       36.0.0
cycler             0.10.0
deepdiff           5.8.0
docopt             0.6.2
enum34             1.1.6
fonttools          4.32.0
future             0.16.0
gitdb              4.0.9
GitPython          3.1.27
gym                0.23.1
gym-notices        0.0.6
idna               2.7
imageio            2.17.0
importlib-metadata 4.11.3
iniconfig          1.1.1
jsonpickle         0.9.6
kiwisolver         1.0.1
lbforaging         1.1.0
matplotlib         3.5.1
mkl-fft            1.3.1
mkl-random         1.2.2
mkl-service        2.4.0
mock               2.0.0
more-itertools     4.3.0
mpyq               0.2.5
munch              2.3.2
networkx           2.8
numpy              1.22.3
ordered-set        4.1.0
packaging          21.3
pathlib2           2.3.2
pbr                4.3.0
Pillow             9.1.0
pip                21.2.4
pluggy             0.7.1
portpicker         1.2.0
probscale          0.2.5
protobuf           3.6.1
py                 1.6.0
py-cpuinfo         8.0.0
pycparser          2.21
pygame             2.1.2
pyglet             1.5.23
pyOpenSSL          22.0.0
pyparsing          2.2.2
PySC2              3.0.0
PySocks            1.7.1
pytest             4.3.1
python-dateutil    2.7.3
PyYAML             5.3.1
requests           2.19.1
rware              1.0.3
s2clientprotocol   4.10.1.75800.0
s2protocol         5.0.9.87702.0
sacred             0.8.0
scipy              1.8.0
setuptools         61.2.0
six                1.11.0
sk-video           1.1.10
SMAC               1.0.0
smmap              5.0.0
snakeviz           2.1.1
tensorboard-logger 0.1.0
tomli              2.0.1
torch              1.11.0
torchaudio         0.11.0
torchvision        0.12.0
tornado            5.1.1
typing_extensions  4.1.1
urllib3            1.23
websocket-client   0.53.0
wheel              0.37.1
whichcraft         0.5.2
wrapt              1.10.11
zipp               3.8.0
semitable commented 2 years ago

Hi @kinalmehta

Not sure what causes this. Could you try downgrading gym to 0.21? There are several breaking Gym updates lately. If that fixes it we will look into fixing it or pinning to 0.21.

kinalmehta commented 2 years ago

Thanks @semitable , it worked. BTW the requirements file seems to be outdated and there are conflicting dependencies. That could be updated. The only pin required could be gym==0.21, PyYAML==5.3.1 and maybe few others. I could test and send a PR if you want.

semitable commented 2 years ago

I am glad it worked. Yeah, we will be happy to merge a PR if you send it! Thanks! :)

semitable commented 2 years ago

Closed by #19