googlesamples/assistant-sdk-python

The Unity environment took too long to respond. ML agents v0.15.1

alex7e98 opened this issue · 1 comments

I was trying out the simple RollerBall project with ml agents.
When I run ML agents v0.15.1 & ML agents v0.15.0, there appears to have errors as I type in

mlagents-learn config/config.yaml --run-id=RollerBall-1

(However, it is fine when i switch back to Ml agent v0.14.1)

the erros shows on the cmd window:

Version information:
ml-agents: 0.15.1,
ml-agents-envs: 0.15.1,
Communicator API: 0.15.0,
TensorFlow: 2.0.1
WARNING:tensorflow:From c:\users\alex\python-envs\ml-agents151\lib\site-packages\tensorflow_core\python\compat\v2_compat.py:65: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
Process Process-1:
Traceback (most recent call last):
File "C:\Users\Alex\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 297, in _bootstrap
self.run()
File "C:\Users\Alex\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "c:\users\alex\downloads\ml-agents-0.15.1\ml-agents\mlagents\trainers\subprocess_env_manager.py", line 98, in worker
worker_id, [shared_float_properties, engine_configuration_channel]
File "c:\users\alex\downloads\ml-agents-0.15.1\ml-agents\mlagents\trainers\learn.py", line 444, in create_unity_environment
side_channels=side_channels,
File "c:\users\alex\downloads\ml-agents-0.15.1\ml-agents-envs\mlagents_envs\environment.py", line 143, in init
aca_output = self.send_academy_parameters(rl_init_parameters_in)
File "c:\users\alex\downloads\ml-agents-0.15.1\ml-agents-envs\mlagents_envs\environment.py", line 558, in send_academy_parameters
return self.communicator.initialize(inputs)
File "c:\users\alex\downloads\ml-agents-0.15.1\ml-agents-envs\mlagents_envs\rpc_communicator.py", line 98, in initialize
self.poll_for_timeout()
File "c:\users\alex\downloads\ml-agents-0.15.1\ml-agents-envs\mlagents_envs\rpc_communicator.py", line 91, in poll_for_timeout
"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 Agents are linked to the appropriate Brains
The environment and the Python interface have compatible versions.
2020-04-09 16:16:09 WARNING [learn.py:343] Unable to save to ./summaries/RollerBall-3_timers.json. Make sure the directory exists

I have checked many posts and I just didnt know how to solve this problem.

Things I already tried to resolve the problem:

  1. I have ran the code below before I start training but no luck.
    pip3 install -e ./ml-agents-envs
    pip3 install -e ./ml-agents

  2. Turning off my firewall, no luck.

The only thing that works is that I switch it back to ml agent V0.14.1

Could anyone please look it up for me, thank you so much.

System Info:
System: Window 10
Unity Version: 2019.3.7f1
Python Version: 3.7.7

Your issue is unrelated to this repository. You may want to look for the appropriate place to report this.