huggingface / deep-rl-class

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

[HANDS-ON BUG] Unit 7 on Apple Silicon #518

Closed bpugnaire closed 1 month ago

bpugnaire commented 2 months ago

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 https://github.com/Unity-Technologies/ml-agents/issues/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 https://github.com/grpc/grpc/issues/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 !

simoninithomas commented 2 months ago

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 🤗

simoninithomas commented 1 month ago

Hey there 👋 , I merged the PR thanks again for your contribution 🤗