Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

ML-Agents - 'Making a New Learning Environment' problems and unrecognized arguments: config.yaml

Discussion in 'ML-Agents' started by Davidowa, Feb 14, 2020.

  1. Davidowa

    Davidowa

    Joined:
    Aug 11, 2017
    Posts:
    6
    Systems Settings:
    Windows 10
    Unity 2019.3.1f1
    Barracuda '0.4.0-preview'
    Anaconda - Virtual environment "ml-agents" with:
    Python 3.7.6
    Tensorflow version: 2.0.1
    ml-agents: 0.13.1,
    ml-agents-envs: 0.13.1
    Communicator API: API-13

    Describe the problems:
    1.- I created an New unity project -New Learning Project- where I followed the instructions of 'Making a New Learning Environment' (https://github.com/Unity-Technologi...lease/docs/Learning-Environment-Create-New.md). I dragged the ML-Agents folder to the project and technically it goes smoothly, but I have a problem with the RollerAcademy script in the editor. It's different from the one in the tutorial. (See Picture) . I'm also posting the scripts I have in the scene.

    Untitled.png
    2 .- When I pass
    (ml-agents) D:\>mlagents-learn D:/Unity Projects/ML-agents/ml-agents/config/config.yaml --run-id=RollerBall-1 --train

    in my terminal, as written in the documentation, I get the message:

    Code (CSharp):
    1. WARNING:tensorflow:From c:\users\dcastill\appdata\local\continuum\anaconda3\envs\ml-agents\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.
    2. Instructions for updating:
    3. non-resource variables are not supported in the long term
    4.  
    5.  
    6.                         ▄▄▄▓▓▓▓
    7.                    ╓▓▓▓▓▓▓█▓▓▓▓▓
    8.               ,▄▄▄m▀▀▀'  ,▓▓▓▀▓▓▄                           ▓▓▓  ▓▓▌
    9.            ▄▓▓▓▀'      ▄▓▓▀  ▓▓▓      ▄▄     ▄▄ ,▄▄ ▄▄▄▄   ,▄▄ ▄▓▓▌▄ ▄▄▄    ,▄▄
    10.           ▄▓▓▓▀        ▄▓▓▀   ▐▓▓▌     ▓▓▌   ▐▓▓ ▐▓▓▓▀▀▀▓▓▌ ▓▓▓ ▀▓▓▌▀ ^▓▓▌  ╒▓▓▌
    11.         ▄▓▓▓▓▓▄▄▄▄▄▄▄▄▓▓▓      ▓▀      ▓▓▌   ▐▓▓ ▐▓▓    ▓▓▓ ▓▓▓  ▓▓▌   ▐▓▓▄ ▓▓▌
    12.         ▀▓▓▓▓▀▀▀▀▀▀▀▀▀▀▓▓▄     ▓▓      ▓▓▌   ▐▓▓ ▐▓▓    ▓▓▓ ▓▓▓  ▓▓▌    ▐▓▓▐▓▓
    13.           ^█▓▓▓        ▀▓▓▄   ▐▓▓▌     ▓▓▓▓▄▓▓▓▓ ▐▓▓    ▓▓▓ ▓▓▓  ▓▓▓▄    ▓▓▓▓`
    14.             '▀▓▓▓▄      ^▓▓▓  ▓▓▓       └▀▀▀▀ ▀▀ ^▀▀    `▀▀ `▀▀   '▀▀    ▐▓▓▌
    15.                ▀▀▀▀▓▄▄▄   ▓▓▓▓▓▓,                                      ▓▓▓▓▀
    16.                    `▀█▓▓▓▓▓▓▓▓▓▌
    17.                         ¬`▀▀▀█▓
    18.  
    19.  
    20. Version information:
    21.   ml-agents: 0.13.1,
    22.   ml-agents-envs: 0.13.1,
    23.   Communicator API: API-13,
    24.   TensorFlow: 2.0.1
    25. usage: mlagents-learn [-h] [--env ENV_PATH] [--curriculum CURRICULUM_FOLDER]
    26.                       [--sampler SAMPLER_FILE_PATH]
    27.                       [--keep-checkpoints KEEP_CHECKPOINTS] [--lesson LESSON]
    28.                       [--load] [--run-id RUN_ID] [--num-runs NUM_RUNS]
    29.                       [--save-freq SAVE_FREQ] [--seed SEED] [--train]
    30.                       [--base-port BASE_PORT] [--num-envs NUM_ENVS]
    31.                       [--docker-target-name DOCKER_TARGET_NAME]
    32.                       [--no-graphics] [--debug] [--multi-gpu] [--env-args ...]
    33.                       [--cpu] [--version] [--width WIDTH] [--height HEIGHT]
    34.                       [--quality-level QUALITY_LEVEL]
    35.                       [--time-scale TIME_SCALE]
    36.                       [--target-frame-rate TARGET_FRAME_RATE]
    37.                       trainer_config_path
    38. mlagents-learn: error: unrecognized arguments: Projects/ML-agents/ml-agents/config/config.yaml
    and the config.yaml file has

    Code (CSharp):
    1. default:
    2.     trainer: ppo
    3.     batch_size: 10
    4.     beta: 5.0e-3
    5.     buffer_size: 100
    6.     epsilon: 0.2
    7.     hidden_units: 128
    8.     lambd: 0.95
    9.     learning_rate: 3.0e-4
    10.     learning_rate_schedule: linear
    11.     max_steps: 5.0e4
    12.     memory_size: 256
    13.     normalize: false
    14.     num_epoch: 3
    15.     num_layers: 2
    16.     time_horizon: 64
    17.     sequence_length: 64
    18.     summary_freq: 1000
    19.     use_recurrent: false
    20.     vis_encode_type: simple
    21.     reward_signals:
    22.         extrinsic:
    23.             strength: 1.0
    24.             gamma: 0.99
    I don't know what to do. Any help provided will be appreciated.
     

    Attached Files:

  2. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    celion_unity likes this.
  3. unity_k53J81t7lFAEwA

    unity_k53J81t7lFAEwA

    Joined:
    Apr 5, 2020
    Posts:
    1
    Instead of this try this -> mlagents-learn D:/Unity Projects/ML-agents/ml-agents/config/trainerconfig.yaml --run-id=default --train


    As there is no file named config.yaml in config folder and there is no run-id named "RollerBall-1" in trainerconfig.yaml, unless it is declared manually.