Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Same agent with no changes went from running at 100ish fps to 1-2 fps, any idea why?

Discussion in 'ML-Agents' started by Hoskinswh, Sep 30, 2022.

  1. Hoskinswh

    Hoskinswh

    Joined:
    Sep 30, 2022
    Posts:
    1
    I have been tinkering with mlagents for the last week or two. I was able to get a few toy projects working and then it started running incredibly slow. I thought maybe my new agent was messing it up so I went to an old scene: the project built in this video


    This one used to, and should, train incredibly fast, but it is a snail now. This leads me to believe it isn't my implementation, but I don't know what it could be. Is there anything that would cause it to run on the CPU instead of the GPU?

    A note, it runs at incredible speeds when running off of a brain, it only drops to a snail pace when training so I am guessing it is something with python.

    Thank you for any help you can give!
     
  2. MidnightGameDeveloper

    MidnightGameDeveloper

    Joined:
    Apr 26, 2014
    Posts:
    117
    You could try to set the torch-device manually. Add --torch-device=cuda to the learn command.