Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
16.93k stars 4.14k forks source link

Outdated UnityTimeOutException in v0.11 #2841

Closed akTwelve closed 4 years ago

akTwelve commented 4 years ago

I'm having training issues, specifically getting the RPC Communcation to work in the release-0.11.0 branch. I'm still trying to debug that, but while doing that I realized that an exception message is no longer relevant due to the removal of the Broadcast Hub and Brains. Figured that should be updated so that the next person to have a connection issue isn't confused. 🙂

Here's the error message: File "c:\users\ak12\anaconda3\envs\ml-agents_0.11\lib\site-packages\mlagents\envs\rpc_communicator.py", line 86, in initialize "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's Broadcast Hub is configured correctly The Agents are linked to the appropriate Brains The environment and the Python interface have compatible versions.

akTwelve commented 4 years ago

Ok, I fixed my problem and in the process realized why I was getting the out-dated exception too.

The problem: I used pip install mlagents, which installed from PyPi. This installs the current version v0.10 instead of installing the new version from the 0.11 branch folder. Oops!

Training started working and the error message is correct when I follow the Installing for Development instructions.

kumarict commented 4 years ago

I'm receiving this same error when running on Ubuntu 16.04. Has v0.11 been confirmed to work on Ubuntu 16.04? I've made sure I'm running the developer code.

surfnerd commented 4 years ago

Hi @kumarict, Please make sure you've installed the python package and UnitySDK from the 0.11.0 release. The gRPC service definition changed and is not backwards compatible with previous versions.

kumarict commented 4 years ago

Hi @surfnerd,

I just installed from the repository and followed the instructions to load the python libraries from the ml-agents-envs and ml-agents directories. When I run ml-agents-learn, it works fine and connects to Unity. However, when I try to use a Jupyter notebook, the connection does not occur when I try the getting started notebook. And again, I'm using Ubuntu 16.04. Has this been confirmed to work? If so, any idea where to look for issues? Thank you.

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.