Help: Training Not starting on my own project

[SOLVED] Hello, I am having an issue that when I try to start my training, nothing happens. No errors, just a message in my console that says “Registered Communicator in Agent”. If I output the values of the OnActionRecievedMethod, it gets some info in the actionsBuffer arg, but it is always 0. I also just completely reinstalled Python, running 3.10.12 through a Conda venv, everything should be the correct versions.

If I run the trainining in the example projects for the 3dBall, that runs with no issue. I copy that over to my current project(where I have successfully trained agents in the past) and that runs. If I run my own training, error as above. I went through the docs new environment guide for the rollerball, to make sure there wasn’t anythign obvious I was missing, and that doesn’t work either. So it seems to be something with the way I sent things up. My unity registry mlagents version is 3.0.0-exp1(loaded from disk from mlagents repo). Also, I should mention that it doesn’t seem to actually connect to the training, no steps are longed and will eventually quit with a generic error because it’s not connecting. The ID in the agent is correct. Not really sure what is wrong, and woudl appreciate any help

ETA: In doing some more testing, I see the 3DBall example does not actually work. The cube heads attempt to balance the ball because they already had a brain. They are not connecting to the training either.

do you have your discrete action space set to size above 1 in the agent behaviour parameters?
do you have unity set to run in the background?

Yes both discrete and cts actions set above 1. Not sure about the Unity running in the background, I will look into that, but is that actually what I need? Unity should stillbe up and visible etc, is that considred running in the background in this case?

I don’t know about having Unity run in the background, but I did have “Connect to Trainer” in project settings turned off :slight_smile: That solved it

interesting, it should be set (and greyed out by default, not sure why yours isn’t)
run in background is important so you can bring the cmd line to the front etc without pausing unity and probably required for multiple builds, not sure, i always turn it on anyway.

I had turned it off manually months ago because I wasn’t working with the training stuff and it made scenes take long to load, but I had forgotten I did that. And I can see the run in background is already on now that it is running