I have docker locally and have verified that it works perfectly well. However, when I submit the same run.py to the gitlab, I got the following error which says unity environment doesn’t respond.
I add some additional parameters compared to the original file:
env = ObstacleTowerEnv(args.environment_filename, docker_training=args.docker_training, retro=False, realtime_mode=False)
By the way, I use gpu (gpu:true is set in the aicrowd.json), don’t know if that’s the problem.
Here’s the error log:
2019-03-07T11:32:22.733086464Z INFO:mlagents_envs:Start training by pressing the Play button in the Unity Editor.
2019-03-07T11:32:52.766988656Z Traceback (most recent call last):
2019-03-07T11:32:52.7670384Z File “run.py”, line 72, in
2019-03-07T11:32:52.767043221Z env = ObstacleTowerEnv(args.environment_filename, docker_training=args.docker_training, retro=False, realtime_mode=False)
2019-03-07T11:32:52.767068055Z File “/srv/conda/lib/python3.6/site-packages/obstacle_tower_env.py”, line 45, in init
2019-03-07T11:32:52.767071047Z timeout_wait=timeout_wait)
2019-03-07T11:32:52.767073489Z File “/srv/conda/lib/python3.6/site-packages/mlagents_envs/environment.py”, line 69, in init
2019-03-07T11:32:52.767076089Z aca_params = self.send_academy_parameters(rl_init_parameters_in)
2019-03-07T11:32:52.767099058Z File “/srv/conda/lib/python3.6/site-packages/mlagents_envs/environment.py”, line 491, in send_academy_parameters
2019-03-07T11:32:52.76710192Z return self.communicator.initialize(inputs).rl_initialization_output
2019-03-07T11:32:52.767104579Z File “/srv/conda/lib/python3.6/site-packages/mlagents_envs/rpc_communicator.py”, line 80, in initialize
2019-03-07T11:32:52.767107093Z “The Unity environment took too long to respond. Make sure that :\n”
2019-03-07T11:32:52.767109735Z mlagents_envs.exception.UnityTimeOutException: The Unity environment took too long to respond. Make sure that :
2019-03-07T11:32:52.767141981Z The environment does not need user interaction to launch
2019-03-07T11:32:52.76714544Z The Academy and the External Brain(s) are attached to objects in the Scene
2019-03-07T11:32:52.76714784Z The environment and the Python interface have compatible versions.
@arthurj so i increased my timeout wait to 30000, and same result notice time stamps on my logs
2019-03-07T13:25:24.799545869Z root
....
2019-03-07T21:45:37.653813452Z "The Unity environment took too long to respond. Make sure that :\n"
2019-03-07T21:45:37.653925272Z mlagents_envs.exception.UnityTimeOutException: The Unity environment took too long to respond. Make sure that :
2019-03-07T21:45:37.653939834Z The environment does not need user interaction to launch
2019-03-07T21:45:37.653945019Z The Academy and the External Brain(s) are attached to objects in the Scene
2019-03-07T21:45:37.653949289Z The environment and the Python interface have compatible versions.
2019-03-07T21:45:37.653953562Z In call to configurable 'create_otc_environment' (<function create_otc_environment at 0x7f7dfdfcaf28>)
2019-03-07T21:45:37.65395818Z In call to configurable 'Runner' (<function Runner.__init__ at 0x7f7dfdfca158>)
2019-03-07T21:45:37.653962707Z In call to configurable 'create_runner' (<function create_runner at 0x7f7dfdfa9f28>)
"The Unity environment took too long to respond. Make sure that :\n"
mlagents_envs.exception.UnityTimeOutException: The Unity environment took too long to respond. Make sure that :
The environment does not need user interaction to launch
The Academy and the External Brain(s) are attached to objects in the Scene
The environment and the Python interface have compatible versions.
using osx with screen, no poup window seen. (same on ubuntu)
Thanks in advance
We have rolled out a stability fix now and hoping this problem to be resolved completely.
Please let us know if this still pops up so we can investigate further accordingly.
@kwea123 Looks like your latest submission is having different issue then the mlagents_envs.exception.UnityTimeOutException. But if it pops up again please let us know by replying to this thread.
@banjtheman I re-evaluated the submission shared by you, and it went well w.r.t. mlagents_envs.exception.UnityTimeOutException after the fix, although failed on some other issue, you can view the same on link now.
@mohanty yea, I’ve increased mine to 600 (even 30000 once) but all that does is keep the agent container idle, it looks like if the environment container starts before the agent displays
INFO:mlagents_envs:Start training by pressing the Play button in the Unity Editor.
The test never starts, and this is easily reproducible on a local environment
Was able to get around this by using the defer import strategy so the mlagent text came 1 second after startup, bit hacky but seems to be only way to get test to run.
2019-03-13T14:16:19.307396414Z root
2019-03-13T14:16:20.443927313Z INFO:mlagents_envs:Start training by pressing the Play button in the Unity Editor.
I just put the ObstacleTower folder which includes the obstacle.x86_64 file in the proper directory. Then I directly run the train.py as the tutorial says. Do I need to start the obstacle.x86_64 file manually before running the train.py?
~/anaconda3/lib/python3.6/site-packages/mlagents_envs/rpc_communicator.py in initialize(self, inputs)
78 if not self.unity_to_external.parent_conn.poll(self.timeout_wait):
79 raise UnityTimeOutException(
—> 80 “The Unity environment took too long to respond. Make sure that :\n”
81 “\t The environment does not need user interaction to launch\n”
82 “\t The Academy and the External Brain(s) are attached to objects in the Scene\n”
UnityTimeOutException: The Unity environment took too long to respond. Make sure that :
The environment does not need user interaction to launch
The Academy and the External Brain(s) are attached to objects in the Scene
The environment and the Python interface have compatible versions.