Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question How to choose appropriate num-envs and num-areas for my training system

Discussion in 'ML-Agents' started by averagegfxart, Nov 11, 2023.

  1. averagegfxart

    averagegfxart

    Joined:
    May 3, 2022
    Posts:
    1
    Running on a 6 core machine with 12 logical processors, and I can't really figure out an optimal balance between num-envs and num-areas for the best training result. My thinking is maybe to set num-envs == number of cores and then tweaking the num-areas such that the steps finish the quickest but wondering what approach everyone else is using?
     
  2. lruminski

    lruminski

    Joined:
    Apr 10, 2018
    Posts:
    9
    I think it depends on the unity environment + training configuration.

    For my current project I first maxed out the singe core that was doing most of the work the single (unity) environment by introducing more areas, which in my case was 4. Then I started benchmarking the fastest training by trying out the optimal number of environments in this case it was 6.

    I ended up with
    --num-areas 24 --num-envs 6


    I think it's right.. seemed to have the best training speed / top cpu utilization, but would love to have someone from Unity chime in as it's not all that well documented as of yet.