You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have ml-agents up and running. When I run mlagents-learn from the command line, and play the game from the Unity Editor - everything works fine (the agent trains). But when I build the game and try to run mlagents on the executable - no training is preformed.
In fact, I believe the python script is getting stuck - I think it runs the game, but never returns to continue executing the code. I have checked this by writing a simple python script to open the game and debug it:
from mlagents_envs.environment import UnityEnvironment
env = UnityEnvironment(file_name=path)
print("yay")
I ran this code on my executable, and the print command was never reached.
I know the problem isn't with python, because I managed to get it to work with executables I found online:
In addition, I know the problem is not with the game, because I ran into these problems also with the 3DBall example, and the very simple ball and plane example (https://unity-technologies.github.io/ml-agents/Learning-Environment-Create-New/). Same problem each time: Training works in the editor, but not with the executable.
I suspect something is wrong with the build process, but I don't know what. I followed the instructions here: https://unity-technologies.github.io/ml-agents/Learning-Environment-Executable/
I have selected "Run In Background" in the Player Settings, I have tried with and without "Development Build" - all without success.
After hours spent on this issue, I decided to try my luck with posting a bug...
Any help will be appriciated!
The training stuck:
Environment:
Unity Version: I have tried with 2022.3.7f1, and with 6000.0.31f1
I have ml-agents up and running. When I run mlagents-learn from the command line, and play the game from the Unity Editor - everything works fine (the agent trains). But when I build the game and try to run mlagents on the executable - no training is preformed.
In fact, I believe the python script is getting stuck - I think it runs the game, but never returns to continue executing the code. I have checked this by writing a simple python script to open the game and debug it:
I ran this code on my executable, and the print command was never reached.
I know the problem isn't with python, because I managed to get it to work with executables I found online:
In addition, I know the problem is not with the game, because I ran into these problems also with the 3DBall example, and the very simple ball and plane example (https://unity-technologies.github.io/ml-agents/Learning-Environment-Create-New/). Same problem each time: Training works in the editor, but not with the executable.
I suspect something is wrong with the build process, but I don't know what. I followed the instructions here: https://unity-technologies.github.io/ml-agents/Learning-Environment-Executable/
I have selected "Run In Background" in the Player Settings, I have tried with and without "Development Build" - all without success.
After hours spent on this issue, I decided to try my luck with posting a bug...
Any help will be appriciated!
The training stuck:
Environment:
develop
branch from source - branch 22, mlagents 1.1.0The text was updated successfully, but these errors were encountered: