Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

I can't solve the error when I play 3DBall for the first time

Discussion in 'ML-Agents' started by shundai_yamamoto, May 29, 2020.

  1. shundai_yamamoto

    shundai_yamamoto

    Joined:
    May 29, 2020
    Posts:
    2
    I'm bigginner of unity and ML-agents. I took first learning of 3DBall, but I got some errors.
    Please tell me why the errors happened and the solutions.

    My Environment:
    Unity : 2018.4.17f1
    MLagents: release_1
    python : 3.7.6
    conda : 4.8.3
    windows10

    I try this command:
    mlagents-learn ./config/trainer_config.yaml --run-id=firstRun
    I got this error:

    Version information:
    ml-agents: 0.16.0,
    ml-agents-envs: 0.16.0,
    Communicator API: 1.0.0,
    TensorFlow: 2.2.0
    2020-05-29 17:04:17.573405: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
    2020-05-29 17:04:17.581637: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    WARNING:tensorflow:From c:\anaconda\envs\ml-agents\lib\site-packages\tensorflow\python\compat\v2_compat.py:96: 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
    2020-05-29 17:04:20 INFO [environment.py:201] Listening on port 5004. Start training by pressing the Play button in the Unity Editor.
    2020-05-29 17:05:20 INFO [subprocess_env_manager.py:191] UnityEnvironment worker 0: environment stopping.
    2020-05-29 17:05:20 WARNING [learn.py:420] Unable to save to ./summaries/firstRun_timers.json. Make sure the directory exists
    Traceback (most recent call last):
    File "c:\anaconda\envs\ml-agents\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
    File "c:\anaconda\envs\ml-agents\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
    File "C:\anaconda\envs\ml-agents\Scripts\mlagents-learn.exe\__main__.py", line 7, in <module>
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\learn.py", line 554, in main
    run_cli(parse_command_line())
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\learn.py", line 550, in run_cli
    run_training(run_seed, options)
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\learn.py", line 407, in run_training
    tc.start_learning(env_manager)
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents_envs\timers.py", line 305, in wrapped
    return func(*args, **kwargs)
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\trainer_controller.py", line 223, in start_learning
    self._reset_env(env_manager)
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents_envs\timers.py", line 305, in wrapped
    return func(*args, **kwargs)
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\trainer_controller.py", line 154, in _reset_env
    env.reset(config=sampled_reset_param)
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\env_manager.py", line 67, in reset
    self.first_step_infos = self._reset_env(config)
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\subprocess_env_manager.py", line 295, in _reset_env
    ew.previous_step = EnvironmentStep(ew.recv().payload, ew.worker_id, {}, {})
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\subprocess_env_manager.py", line 92, in recv
    raise env_exception
    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.

    I can't understand this error.
    Please give me solution.
     
  2. MrWetsnow

    MrWetsnow

    Joined:
    Jan 5, 2020
    Posts:
    60
    1. mkdir summaries (for the first error)

    2. Just to confirm, after you ran this command, did you press 'play' in Unity?
     
  3. shundai_yamamoto

    shundai_yamamoto

    Joined:
    May 29, 2020
    Posts:
    2
    thank you for replying.
    I pressed 'play' in Unity after I ran this command.
    I think the 3DBall worked with predicted model.
    Did the second error of 'The Agents are linked to the appropriate Brains' occur because of that reasen 'the 3DBall worked with predicted model' ?