boncey / Flickr4Java

Java API For Flickr. Fork of FlickrJ
BSD 2-Clause "Simplified" License
176 stars 154 forks source link

unity ml-agent port #568

Closed salbatarni closed 2 years ago

salbatarni commented 3 years ago

Subject of the issue

I am having an issue with training in unity I am following the rollerball example, but the training is not working. I google and found the following

Your environment

anaconda unity ml agent release 1.7 mlagents Version: 0.26.0 python 3.8

the command

this is the command I am running mlagents-learn --run-id=vehicle_test --train --force

Log

[WARNING] The --train option has been deprecated. Train mode is now the default. Use --inference to run in inference mode.
[INFO] Listening on port 5004. Start training by pressing the Play button in the Unity Editor.
[INFO] Connected to Unity environment with package version 1.0.8 and communication version 1.0.0
Traceback (most recent call last):
  File "C:\Users\salam\Anaconda3\envs\unity-ml1\Scripts\mlagents-learn-script.py", line 33, in <module>
    sys.exit(load_entry_point('mlagents', 'console_scripts', 'mlagents-learn')())
  File "c:\users\salam\desktop\fall 2021\senior unity\ml-agents-release_17\ml-agents\mlagents\trainers\learn.py", line 250, in main
    run_cli(parse_command_line())
  File "c:\users\salam\desktop\fall 2021\senior unity\ml-agents-release_17\ml-agents\mlagents\trainers\learn.py", line 246, in run_cli
    run_training(run_seed, options)
  File "c:\users\salam\desktop\fall 2021\senior unity\ml-agents-release_17\ml-agents\mlagents\trainers\learn.py", line 125, in run_training
    tc.start_learning(env_manager)
  File "c:\users\salam\desktop\fall 2021\senior unity\ml-agents-release_17\ml-agents-envs\mlagents_envs\timers.py", line 305, in wrapped
    return func(*args, **kwargs)
  File "c:\users\salam\desktop\fall 2021\senior unity\ml-agents-release_17\ml-agents\mlagents\trainers\trainer_controller.py", line 173, in start_learning
    self._reset_env(env_manager)
  File "c:\users\salam\desktop\fall 2021\senior unity\ml-agents-release_17\ml-agents-envs\mlagents_envs\timers.py", line 305, in wrapped
    return func(*args, **kwargs)
  File "c:\users\salam\desktop\fall 2021\senior unity\ml-agents-release_17\ml-agents\mlagents\trainers\trainer_controller.py", line 105, in _reset_env
    env_manager.reset(config=new_config)
  File "c:\users\salam\desktop\fall 2021\senior unity\ml-agents-release_17\ml-agents\mlagents\trainers\env_manager.py", line 68, in reset
    self.first_step_infos = self._reset_env(config)
  File "c:\users\salam\desktop\fall 2021\senior unity\ml-agents-release_17\ml-agents\mlagents\trainers\subprocess_env_manager.py", line 333, in _reset_env
    ew.previous_step = EnvironmentStep(ew.recv().payload, ew.worker_id, {}, {})
  File "c:\users\salam\desktop\fall 2021\senior unity\ml-agents-release_17\ml-agents\mlagents\trainers\subprocess_env_manager.py", line 98, 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' Behavior Parameters > Behavior Type is set to "Default"
         The environment and the Python interface have compatible versions.