Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Help Wanted TrainerConfigError: The option default was specified in your YAML file, but is invalid.

Discussion in 'ML-Agents' started by Point_Nemo, Jun 15, 2020.

  1. Point_Nemo

    Point_Nemo

    Joined:
    May 30, 2020
    Posts:
    3
    Hello Everyone, I am stuck . please help
    I was following the Humming Birds Project on learn.unity.com

    and at the point where i have to start training, when i type the command
    mlagents-learn ./trainer_config.yaml --run-id hb_01
    in anaconda prompt

    I receive the following error

    (ml-agents-1.0) C:\Users\Captain\Desktop\mlagents>mlagents-learn ./trainer_config.yaml --run-id hb_01
    2020-06-15 19:28:04.676023: 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-06-15 19:28:04.680877: 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 d:\pf\anaconda3\envs\ml-agents-1.0\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
    Traceback (most recent call last):
    File "d:\pf\anaconda3\envs\ml-agents-1.0\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
    File "d:\pf\anaconda3\envs\ml-agents-1.0\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
    File "D:\pf\anaconda3\envs\ml-agents-1.0\Scripts\mlagents-learn.exe\__main__.py", line 7, in <module>
    File "d:\pf\anaconda3\envs\ml-agents-1.0\lib\site-packages\mlagents\trainers\learn.py", line 322, in main
    run_cli(parse_command_line())
    File "d:\pf\anaconda3\envs\ml-agents-1.0\lib\site-packages\mlagents\trainers\learn.py", line 56, in parse_command_line
    return RunOptions.from_argparse(args)
    File "d:\pf\anaconda3\envs\ml-agents-1.0\lib\site-packages\mlagents\trainers\settings.py", line 351, in from_argparse
    key

    mlagents.trainers.exception.TrainerConfigError: The option default was specified in your YAML file, but is invalid.
     
    Hsgngr likes this.
  2. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    229
  3. Point_Nemo

    Point_Nemo

    Joined:
    May 30, 2020
    Posts:
    3
    Thank You ! :):) It worked !! :) @mbaske
     
  4. Pippin11

    Pippin11

    Joined:
    Mar 14, 2020
    Posts:
    1
    What needs to be changed in the yaml file to fix this problem?
     
  5. artemmakanov

    artemmakanov

    Joined:
    Jun 16, 2020
    Posts:
    1
    Yes, Please, how did you change this yaml file???
     
  6. ItzKyle

    ItzKyle

    Joined:
    Sep 17, 2017
    Posts:
    3
    Please, someone, tell us how to change the yaml file.
     
  7. Hsgngr

    Hsgngr

    Joined:
    Dec 28, 2015
    Posts:
    31
    Captain here ! as @mbaske said you should use that link, for me it took some time so here is the code:
    Code (Boo):
    1.  python -m mlagents.trainers.upgrade_config E:\yourfolder\trainer_config.yaml E:\yourfolder\trainer_new_config.yaml
    You should give the absolute path of your configuration file *flies away
     
  8. applenicks

    applenicks

    Joined:
    Aug 7, 2019
    Posts:
    1
    Try this:


    behaviors:
    Hummingbird:
    trainer_type: ppo
    hyperparameters:
    batch_size: 2048
    buffer_size: 20480
    learning_rate: 0.0003
    beta: 0.005
    epsilon: 0.2
    lambd: 0.95
    num_epoch: 3
    learning_rate_schedule: linear
    network_settings:
    normalize: false
    hidden_units: 256
    num_layers: 2
    vis_encode_type: simple
    reward_signals:
    extrinsic:
    gamma: 0.99
    strength: 1.0
    keep_checkpoints: 5
    checkpoint_interval: 500000
    max_steps: 5000000
    time_horizon: 128
    summary_freq: 10000
    threaded: true
     
    Last edited: Jun 18, 2020
  9. Point_Nemo

    Point_Nemo

    Joined:
    May 30, 2020
    Posts:
    3
    following the link
    https://github.com/Unity-Technologies/ml-agents/blob/release_3_docs/docs/Migrating.md

    For me (i.e migrating from release 1 to latest)

    Open In anaconda prompt,
    1. Activate your ML environment and then
    2. Change the directory to the folder containing 'trainer_config.yaml' (downloaded form course material)
    I did > cd desktop\mlagents as my file was in mlagents folder in desktop.

    3. Run the command >python -m mlagents.trainers.upgrade_config [old yaml file name] [new file name]

    I did > python -m mlagents.trainers.upgrade_config trainer_config.yaml abc.yaml

    The new file abc.yaml is now the main file you need to work with, so delete the old 'trainer_config.yaml' and rename abc.yaml to trainer_config.yaml

    now follow the tutorial.

    PS : I am attaching the converted file with extension .txt rename it to .yaml that is rename trainer_config.txt to trainer_config.yaml and use this file.

    Also if in anaconda prompt you have not changed to the directory (folder) where the trainer_config.yaml file is then

    at [old yaml file name] and [new file name] you can give the exact locations of the file respectively
    like, i would have done

    python -m mlagents.trainers.upgrade_config C:\Users\Captain\Desktop\mlagents\trainer_config.yaml C:\Users\Captain\Desktop\mlagents\abc.yaml

    Hope It Helps...
     

    Attached Files:

    itaielidan likes this.
  10. itaielidan

    itaielidan

    Joined:
    Dec 20, 2018
    Posts:
    1
    Thank you! this worked perfectly
     
unityunity