Search Unity

Run agents in background to gain perfomance.

Discussion in 'ML-Agents' started by enzodtz, Apr 1, 2021.

  1. enzodtz

    enzodtz

    Joined:
    Aug 21, 2020
    Posts:
    7
    I would like to know if I can run for example 100 individuals, but just render the best of them, or a small group, in order to get better performance, since 100 3d simulations actually consume a lot of computacional power.

    Thanks.
     
  2. ruoping_unity

    ruoping_unity

    Unity Technologies

    Joined:
    Jul 10, 2020
    Posts:
    134
    I'm not sure I understand what you're trying to do. Can you elaborate on more details?
    Are you talking about training or inference? Are they in the same scene or are you running multiple Unity build?

    > just render the best of them
    Is it talking about camera rendering?

    > in order to get better performance
    do you mean computation performance or training performance?
     
  3. enzodtz

    enzodtz

    Joined:
    Aug 21, 2020
    Posts:
    7
    Well, sorry if this was confusing,

    Actually, I was saying performance as generations per time when trainning, since when you render multiple environments, it takes longer to run that generation (NN operations are way faster then render ones).

    Something such as run all the math in the background, but don't render it, kinda running the "backend" but not the front end.
     
  4. ruoping_unity

    ruoping_unity

    Unity Technologies

    Joined:
    Jul 10, 2020
    Posts:
    134
    Yes you can speed up by not rendering the camera view.
    In the editor you just turn off all the cameras. If you're training using player build, you can specify --no-graphics in CLI.
     
  5. enzodtz

    enzodtz

    Joined:
    Aug 21, 2020
    Posts:
    7
    Thanks!