Setting up mlAgents for actual trainig is not working for me

Hello everyone

i’m relatively fresh and had a first look on Unitys ML-Agents yesterday.
At this point i’m desperate and dont know what to do or to try.

My Versions:

  • Unity 2019.3.13f1
  • Python 3.7
  • ML-Agents 0.16.0
  • TensorFlow 2.2.0

My problem:
I followed the unity guides and installed everything, including the examples, accordingly.
Running “push Block” in inference mode works fine without any errors.
When i run the console command to train, there are only issues with cuda-versions, but i dont have a nvidia card so thats no problem for me right?
After getting the “Listening on port 5004. Start training by pressing the Play button in the Unity Editor.” message in console i hit play in unity. Than nothing happens except unity displays the following error in the console: “Couldn’t connect to trainer on port 5004 using API version 1.0.0. Will perform inference instead.” Last thing in the windows console is of course a UnityTimeoutException.

I already tried several things including turning of the firewall or using older ml-agent versions (014.1 and 0.15.1)
Maybe you guys have some ideas.

Small update:
I notized, that in my uploaded images, i wasn’t running any commands in a virtual environments, but even with adjusting this issue, there is no difference.
I tried the same process on my girlfriends laptop and everything works fine right out of the box.
I really dont have any ideas how i could have messed up.

Update 2:
Because i didnt know anything else to do, i reinstalled windows without keeping any data, programs or setups.
My problem stays the same, at this point im totally desperate.
Im not too deep in windows functionallity, may my unity installation on D: instead of C: might be an issue?


I’ll kick this over to the team for them to have a look!

I’m having the same error message while trying to run ml agents with the AI demo the “Karting Mod: Smart Karts Training Guide” here: Karting Mod: Smart Karts Training Guide - Unity Learn"
same version stamps as above.

same any solution for this?

I dont know what really caused my issue, but its solved now.
I had to completely reinstall Windows from scratch. Not only using the windows creation tool, but also formatting my C: drive and booting from USB.
Now everything is working fine, maybe this is an option for you guys.

1 Like

hi I was working on the kart too… do you able to make a training?

im thinking to do the same. I have 2 pcs made everything exactly same on both and on my main computer its not working other one has no problems at all

Hi, I had the same issu, I solved it by following the exact documentation on the release I chose (12 in my case) and all the github packages for that release. I also did all these in my C: instead of my D:, when I try to do it on my D: it doesn’t work, my guess is beacause when I installed python, it got installed on my C: and not D:

I haven’t tried yet but my folders names on my D: had spaces and French characters (ex: ç à è) so may be this was the issue, but not sure