Search Unity

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

Question Unable to train with linux executable

Discussion in 'ML-Agents' started by kunpeng0609, Jan 26, 2023.

  1. kunpeng0609

    kunpeng0609

    Joined:
    Jan 26, 2023
    Posts:
    1
    Hello,

    I was trying to train an ML-Agents project using linux executable, but it reported error. The complete log was shown as following:

    ~/ml-agents-release_20/unity-volume$ mlagents-learn 3DBall.yaml --env=3DBall.x86_64 --run-id=test --no-graphics --train

    ┐ ╖
    ╓╖╬│╡ ││╬╖╖
    ╓╖╬│││││┘ ╬│││││╬╖
    ╖╬│││││╬╜ ╙╬│││││╖╖ ╗╗╗
    ╬╬╬╬╖││╦╖ ╖╬││╗╣╣╣╬ ╟╣╣╬ ╟╣╣╣ ╜╜╜ ╟╣╣
    ╬╬╬╬╬╬╬╬╖│╬╖╖╓╬╪│╓╣╣╣╣╣╣╣╬ ╟╣╣╬ ╟╣╣╣ ╒╣╣╖╗╣╣╣╗ ╣╣╣ ╣╣╣╣╣╣ ╟╣╣╖ ╣╣╣
    ╬╬╬╬┐ ╙╬╬╬╬│╓╣╣╣╝╜ ╫╣╣╣╬ ╟╣╣╬ ╟╣╣╣ ╟╣╣╣╙ ╙╣╣╣ ╣╣╣ ╙╟╣╣╜╙ ╫╣╣ ╟╣╣
    ╬╬╬╬┐ ╙╬╬╣╣ ╫╣╣╣╬ ╟╣╣╬ ╟╣╣╣ ╟╣╣╬ ╣╣╣ ╣╣╣ ╟╣╣ ╣╣╣┌╣╣╜
    ╬╬╬╜ ╬╬╣╣ ╙╝╣╣╬ ╙╣╣╣╗╖╓╗╣╣╣╜ ╟╣╣╬ ╣╣╣ ╣╣╣ ╟╣╣╦╓ ╣╣╣╣╣
    ╙ ╓╦╖ ╬╬╣╣ ╓╗╗╖ ╙╝╣╣╣╣╝╜ ╘╝╝╜ ╝╝╝ ╝╝╝ ╙╣╣╣ ╟╣╣╣
    ╩╬╬╬╬╬╬╦╦╬╬╣╣╗╣╣╣╣╣╣╣╝ ╫╣╣╣╣
    ╙╬╬╬╬╬╬╬╣╣╣╣╣╣╝╜
    ╙╬╬╬╣╣╣╜


    Version information:
    ml-agents: 0.30.0,
    ml-agents-envs: 0.30.0,
    Communicator API: 1.5.0,
    PyTorch: 1.11.0+cu102
    [WARNING] The --train option has been deprecated. Train mode is now the default. Use --inference to run in inference mode.
    [INFO] Learning was interrupted. Please wait while the graph is generated.
    Traceback (most recent call last):
    File "/home/lya/.local/bin/mlagents-learn", line 8, in <module>
    sys.exit(main())
    File "/home/lya/.local/lib/python3.10/site-packages/mlagents/trainers/learn.py", line 264, in main
    run_cli(parse_command_line())
    File "/home/lya/.local/lib/python3.10/site-packages/mlagents/trainers/learn.py", line 260, in run_cli
    run_training(run_seed, options, num_areas)
    File "/home/lya/.local/lib/python3.10/site-packages/mlagents/trainers/learn.py", line 136, in run_training
    tc.start_learning(env_manager)
    File "/home/lya/.local/lib/python3.10/site-packages/mlagents_envs/timers.py", line 305, in wrapped
    return func(*args, **kwargs)
    File "/home/lya/.local/lib/python3.10/site-packages/mlagents/trainers/trainer_controller.py", line 197, in start_learning
    raise ex
    File "/home/lya/.local/lib/python3.10/site-packages/mlagents/trainers/trainer_controller.py", line 172, in start_learning
    self._reset_env(env_manager)
    File "/home/lya/.local/lib/python3.10/site-packages/mlagents_envs/timers.py", line 305, in wrapped
    return func(*args, **kwargs)
    File "/home/lya/.local/lib/python3.10/site-packages/mlagents/trainers/trainer_controller.py", line 105, in _reset_env
    env_manager.reset(config=new_config)
    File "/home/lya/.local/lib/python3.10/site-packages/mlagents/trainers/env_manager.py", line 68, in reset
    self.first_step_infos = self._reset_env(config)
    File "/home/lya/.local/lib/python3.10/site-packages/mlagents/trainers/subprocess_env_manager.py", line 446, in _reset_env
    ew.previous_step = EnvironmentStep(ew.recv().payload, ew.worker_id, {}, {})
    File "/home/lya/.local/lib/python3.10/site-packages/mlagents/trainers/subprocess_env_manager.py", line 101, in recv
    raise env_exception
    mlagents_envs.exception.UnityEnvironmentException: Environment shut down with return code 127.


    I also tried to use learn.py but also got error above, and I couldn't figure out why. I would appreciate it a lot if anyone could help. Thanks!
     
  2. good_guy_erik

    good_guy_erik

    Joined:
    Feb 13, 2023
    Posts:
    2
    i have the same problem, could you solve it?
     
  3. 000ShanE000

    000ShanE000

    Joined:
    Dec 31, 2022
    Posts:
    1
    Does your Agent have the component "Decision Requester"? I was receiving these error messages and adding that component fixed the issue.