Search Unity

Question Parallelization of Environments

Discussion in 'ML-Agents' started by seboz123, Jul 2, 2020.

  1. seboz123

    seboz123

    Joined:
    Mar 7, 2020
    Posts:
    24
    Hi!

    So I have some questions regarding parallelization in ml-agents. Maybe someone can clarify these things.
    With the python API you are able to run multiple environments inside one singe executable.
    Is this faster then spawining multiple instances of the Environment, like with the gym wrapper and for example baselines SupProcVec class?
    Also is there a similar class (like supprocvec env) for the python api or an example how to run multiple instances of an executable, with for example mpi4py? Or would it make sense to just increase the number of environments of the executable?
    Thanks in advance!
     
  2. seboz123

    seboz123

    Joined:
    Mar 7, 2020
    Posts:
    24
    Also another thing: I read somewhere, that you cannot use the parameter no-graphics=True when you are using physics inside the game. Is that right? So I could not use collison checks/Rigidbodys?
     
  3. autoli

    autoli

    Joined:
    May 25, 2020
    Posts:
    9
    I have asked the similiar question before. there is a way for multiple instances of an executable to use "--num-envs".
    no-graphics=True when not using visual observation. you can have a try and I am not sure about it.
     
    Last edited: Jul 4, 2020
  4. seboz123

    seboz123

    Joined:
    Mar 7, 2020
    Posts:
    24
    I am using my own implementations of Algorithms so I cannot use --num-envs. That works only for ppo and sac I think, which are already implemented.