huggingface / deep-rl-class

This repo contains the syllabus of the Hugging Face Deep Reinforcement Learning Course.
Apache License 2.0
3.87k stars 594 forks source link

Unit 7 Hands-on SoccerTwos.app unable to start on intel Mac #220

Closed lsdxp closed 1 year ago

lsdxp commented 1 year ago

I am using pretty old Macbook which is still running intel and when I tried to start training, the executable environment always timeout.

The issue main log is:

File "...../Desktop/unit7/ml-agents/ml-agents/mlagents/trainers/subprocess_env_manager.py", line 101, in recv raise env_exception mlagents_envs.exception.UnityTimeOutException: The Unity environment took too long to respond. Make sure that : The environment does not need user interaction to launch The Agents' Behavior Parameters > Behavior Type is set to "Default" The environment and the Python interface have compatible versions. If you're running on a headless server without graphics support, turn off display by either passing --no-graphics option or build your Unity executable as server build.

but when you check debug log, you can see

Unexpected exception when trying to initialize communication: System.IO.IOException: Error loading native library "....../Desktop/unit7/ml-agents/training-envs-executables/SoccerTwos-3/SoccerTwos.app/Contents/Resources/Data/Managed/../../../Plugins/libgrpc_csharp_ext.x64.bundle" you can see below, thanks to https://github.com/Unity-Technologies/ml-agents/issues/5759 and @xlla

libgrpc_csharp_ext.x64.bundle: /Users/christophergoy/code/ml-agents-grpc/cmake/build/libgrpc_csharp_ext.dylib

lsdxp commented 1 year ago

my issue is fixed after use Grpc.Core version 1.20 libgrpc_csharp_ext.x64.dylib. Feel free to download to replace the existing one if you also have the same issue:

https://github.com/lsdxp/fix-you-know/tree/master/grpc-core-intel