huggingface/deep-rl-class

[HANDS-ON BUG] Unit 7 on Apple Silicon

bpugnaire opened this issue · 2 comments

Describe the bug

The proposed methodology to install ml-agents does not work by default on Mac

Material

Macbook Pro M2 running MacOs Ventura

To install you have to make sure you pull the right ml-agents branch ('develop') which config file are updated as demonstrated in this issue on the ml-agents repo Unity-Technologies/ml-agents#6019.

If you don't, you have endless issues of not being able to build ONNX wheel.

Then you have to test if the command ml-agents --help works but it can raise another error of an unidentified character which I have identified stem from this issue in grpc grpc/grpc#33714.
To fix it you need to run conda install grpcio since gRPC installed vi PYPI doesn't do well with conda venv it seems.

Lastly, its not much but I think you could provide the mac command to launch the training which is
mlagents-learn ./config/poca/SoccerTwos.yaml --env=./training-envs-executables/SoccerTwos/SoccerTwos.app --run-id="SoccerTwos" --no-graphics because if someone doesn't pay attention to the change in folder structure they enter more debugging since ml-agents doesn't like duplicated run-id and so on. Just a nice QOL change IMO

I can try to do a PR if you need.

Thank you for the great ressource nonetheless !

Hey there 👋 , yes if you can open a PR to add instructions, that would be useful for other students who have Apple Silicon CPU. Thanks 🤗