Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
17.12k stars 4.15k forks source link

Error: The option curriculum was specified in your YAML file, but is invalid. #4439

Closed nntsrb closed 2 years ago

nntsrb commented 4 years ago

I have this error when I tried to train with the file below. It used to work before, but now it seems there are some problem with the curriculum file.

behaviors:
  TileBaseISO:
    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: constant
    network_settings:
      normalize: false
      hidden_units: 512
      num_layers: 2
      vis_encode_type: simple
    reward_signals:
      extrinsic:
        gamma: 0.99
        strength: 1.0
    keep_checkpoints: 5
    max_steps: 50000000
    time_horizon: 1000
    summary_freq: 10000
    threaded: true
    self_play:
      save_steps: 50000
      team_change: 200000
      swap_steps: 2000
      window: 10
      play_against_latest_model_ratio: 0.5
      initial_elo: 1200.0

curriculum:
  TileBaseISO:
    measure: reward
    thresholds: [-1.8, -1.2, -0.5, 0.5, 1.2, 1.8]
    min_lesson_length: 80
    signal_smoothing: true
    parameters:
      mosquito_count: [8.0, 7.0, 6.0, 5.0, 4.0, 3.0]
harperj commented 4 years ago

Hi @nntsrb -- the config format for curriculum learning did in face change. We've updated the docs on how to configure curriculum learning here: https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Training-ML-Agents.md#curriculum

jwson97 commented 4 years ago

I also have same problem. But I change my yaml file like this : but when I check "checkpoint_radius" parameter value in tensorboard after training. The value is 0 which is set as default. curriculum is not working. What is the problem.

behaviors: AircraftPlayer: trainer_type: ppo hyperparameters: batch_size : 2048 beta: 1.0e-2 buffer_size: 20480 epsilon: 0.2 lambd: 0.95 learning_rate: 3.0e-4 learning_rate_schedule: linear num_epoch: 3 network_settings: hidden_units: 256 memory: memory_size : 256 sequence_length: 64 normalize : false num_layers: 2 vis_encoder_type: simple reward_signals: extrinsic: strength: 1.0 gamma: 0.99 max_steps: 5.0e6 time_horizon: 128 summary_freq: 32000 threaded: true

environment_parameters: checkpoint_radius: curriculum:

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity in the last 28 days. It will be closed in the next 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed because it has not had activity in the last 42 days. If this issue is still valid, please ping a maintainer. Thank you for your contributions.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.