Skip to content

Commit

Permalink
Merge pull request #523 from bpugnaire/fix-unit7-macsilicon
Browse files Browse the repository at this point in the history
Fix issue #518
  • Loading branch information
simoninithomas authored May 27, 2024
2 parents 975bd1c + ac794ed commit f3e5d0f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions units/en/unit7/hands-on.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ pip install -e ./ml-agents-envs
pip install -e ./ml-agents
```

Mac users on Apple Silicon may encounter troubles with the installation (e.g. ONNX wheel build failing), you should first try to install grpcio:
```bash
conda install grpcio
```
[This github issue](https://github.com/Unity-Technologies/ml-agents/issues/6019) in the official ml-agent repo might also help you.

Finally, you need to install git-lfs: https://git-lfs.com/

Now that it’s installed, we need to add the environment training executable. Based on your operating system you need to download one of them, unzip it and place it in a new folder inside `ml-agents` that you call `training-envs-executables`
Expand Down Expand Up @@ -221,10 +227,16 @@ Depending on your hardware, 5M timesteps (the recommended value, but you can als

Depending on the executable you use (windows, ubuntu, mac) the training command will look like this (your executable path can be different so don’t hesitate to check before running).

For Windows, it might look like this:
```bash
mlagents-learn ./config/poca/SoccerTwos.yaml --env=./training-envs-executables/SoccerTwos.exe --run-id="SoccerTwos" --no-graphics
```

For Mac, it might look like this:
```bash
mlagents-learn ./config/poca/SoccerTwos.yaml --env=./training-envs-executables/SoccerTwos/SoccerTwos.app --run-id="SoccerTwos" --no-graphics
```

The executable contains 8 copies of SoccerTwos.

⚠️ It’s normal if you don’t see a big increase of ELO score (and even a decrease below 1200) before 2M timesteps, since your agents will spend most of their time moving randomly on the field before being able to goal.
Expand Down

0 comments on commit f3e5d0f

Please sign in to comment.