ShayekhBinIslam / hummingbird-mlagent

A Simple Game Using Unity ML-Agents
7 stars 9 forks source link

invalid default option #1

Closed alowc closed 3 years ago

alowc commented 3 years ago

I'm trying to start the training with the following command

Training andreacosta$ mlagents-learn trainer_config.yaml --run-id hb_00

but I get the following error at runtime:

WARNING:tensorflow:From /Users/andreacosta/opt/anaconda3/envs/ml-agents-env/lib/python3.7/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 "/Users/andreacosta/opt/anaconda3/envs/ml-agents-env/bin/mlagents-learn", line 8, in sys.exit(main()) File "/Users/andreacosta/opt/anaconda3/envs/ml-agents-env/lib/python3.7/site-packages/mlagents/trainers/learn.py", line 278, in main run_cli(parse_command_line()) File "/Users/andreacosta/opt/anaconda3/envs/ml-agents-env/lib/python3.7/site-packages/mlagents/trainers/learn.py", line 55, in parse_command_line return RunOptions.from_argparse(args) File "/Users/andreacosta/opt/anaconda3/envs/ml-agents-env/lib/python3.7/site-packages/mlagents/trainers/settings.py", line 794, in from_argparse key mlagents.trainers.exception.TrainerConfigError: The option default was specified in your YAML file, but is invalid.

The version info of MLAgent package is the following:

(ml-agents-env) MBP-di-Andrea-4:Training andreacosta$ pip show mlagents Name: mlagents Version: 0.21.1 Summary: Unity Machine Learning Agents Home-page: https://github.com/Unity-Technologies/ml-agents Author: Unity Technologies Author-email: ML-Agents@unity3d.com License: UNKNOWN Location: /Users/andreacosta/opt/anaconda3/envs/ml-agents-env/lib/python3.7/site-packages Requires: h5py, protobuf, pyyaml, six, mlagents-envs, tensorflow, numpy, cattrs, grpcio, attrs, Pillow Required-by:

EnricoBeltramo commented 3 years ago

Looking at here: https://forum.unity.com/threads/trainerconfigerror-the-option-default-was-specified-in-your-yaml-file-but-is-invalid.912671/

I tried follow config (post 3) and i looks to work: 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

ShayekhBinIslam commented 3 years ago

We seems to have a version issue here. I used - mlagents==0.16.1 mlagents-envs==0.16.1