ray-project / ray

Ray is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
https://ray.io
Apache License 2.0
33.09k stars 5.6k forks source link

[RLlib] Unity game executable crashes when following the tutorial #38392

Open franceneee opened 1 year ago

franceneee commented 1 year ago

What happened + What you expected to happen

I was trying out the Unity tutorial image

But that caused my 3DBall.exe to crash with this error image

❗ I managed to fix the error though, by editing the file in ray/rllib/env/external_env.py:

  1. Find all variables cur_terminated_dict
  2. Replace with cur_done_dict image

Versions / Dependencies

absl-py==1.4.0 aiosignal==1.3.1 ale-py==0.8.1 ansicon==1.89.0 atari-py==0.2.9 attrs==23.1.0 AutoROM==0.4.2 AutoROM.accept-rom-license==0.6.1 cachetools==5.3.1 cattrs==1.5.0 certifi==2023.7.22 charset-normalizer==3.2.0 click==8.1.6 cloudpickle==2.2.1 colorama==0.4.6 distlib==0.3.7 dm-tree==0.1.8 filelock==3.12.2 frozenlist==1.4.0 google-auth==2.22.0 google-auth-oauthlib==1.0.0 grpcio==1.57.0 gym==0.26.2 gym-notices==0.0.8 Gymnasium==0.26.3 gymnasium-notices==0.0.1 h5py==3.9.0 idna==3.4 imageio==2.31.1 importlib-metadata==6.8.0 importlib-resources==6.0.1 Jinja2==3.1.2 jsonschema==4.19.0 jsonschema-specifications==2023.7.1 lazy_loader==0.3 lz4==4.3.2 Markdown==3.4.4 markdown-it-py==3.0.0 MarkupSafe==2.1.3 mdurl==0.1.2 mlagents==0.30.0 mlagents-envs==0.30.0 mpmath==1.3.0 msgpack==1.0.5 networkx==3.1 numpy==1.21.2 nvidia-ml-py==12.535.77 oauthlib==3.2.2 opencensus-context==0.1.3 packaging==23.1 pandas==2.0.3 PettingZoo==1.15.0 Pillow==10.0.0 pkgutil_resolve_name==1.3.10 protobuf==3.20.0 psutil==5.9.5 py-spy==0.3.14 pyarrow==6.0.1 pyasn1==0.5.0 pyasn1-modules==0.3.0 pydantic==1.10.12 Pygments==2.16.1 pypiwin32==223 python-dateutil==2.8.2 pytz==2023.3 PyWavelets==1.4.1 pywin32==306 PyYAML==6.0.1 ray==2.6.2 referencing==0.30.2 requests==2.31.0 requests-oauthlib==1.3.1 rich==13.5.2 rpds-py==0.9.2 rsa==4.9 scikit-image==0.21.0 scipy==1.10.1 six==1.16.0 smart-open==6.3.0 sniffio==1.3.0 sympy==1.12 tensorboard==2.14.0 tensorboard-data-server==0.7.1 tensorboardX==2.6.2 tifffile==2023.7.10 torch==2.0.1 tqdm==4.66.1 typer==0.9.0 typing_extensions==4.7.1 tzdata==2023.3 urllib3==1.26.16 wcwidth==0.2.6 Werkzeug==2.3.6 zipp==3.16.2

Reproduction script

run (two separate shells/machines): $ python unity3d_server.py --env 3DBall $ python unity3d_client.py --inference-mode=local --game 3DBall.exe

** I have my client and server python scripts where the executable is

Issue Severity

Medium: It is a significant difficulty but I can work around it.

ArturNiederfahrenhorst commented 1 year ago

Hi @franceneee ,

That is indeed a bug. We'll have to write a test to cover this code. Thanks for uncovering it!

franceneee commented 1 year ago

Hi @franceneee ,

That is indeed a bug. We'll have to write a test to cover this code. Thanks for uncovering it!

no worries, glad I could help 😄