浏览代码

Changing learn.py log messages. (#1159)

* Changing learn.py log messages.

- learn.py refers to the mlagents-learn script now.
- If a non-existant trainer config is passed, the log message
  correctly points that out now.

* Changing the curriculum arg from file to dir.
/develop-generalizationTraining-TrainerController
GitHub 6 年前
当前提交
6430fc86
共有 2 个文件被更改,包括 4 次插入5 次删除
  1. 6
      ml-agents/mlagents/learn.py
  2. 3
      ml-agents/mlagents/trainers/trainer_controller.py

6
ml-agents/mlagents/learn.py


logger = logging.getLogger('mlagents.learn')
_USAGE = '''
Usage:
learn <trainer-config-path> [options]
learn --help
mlagents-learn <trainer-config-path> [options]
mlagents-learn --help
--curriculum=<file> Curriculum json file for environment [default: None].
--curriculum=<directory> Curriculum json directory for environment [default: None].
--keep-checkpoints=<n> How many model checkpoints to keep [default: 5].
--lesson=<n> Start learning from this lesson [default: 0].
--load Whether to load the model or randomly initialize [default: False].

3
ml-agents/mlagents/trainers/trainer_controller.py


return trainer_config
except IOError:
raise UnityEnvironmentException('Parameter file could not be found '
'here {}. Will use default Hyper '
'parameters.'
'at {}.'
.format(self.trainer_config_path))
except UnicodeDecodeError:
raise UnityEnvironmentException('There was an error decoding '

正在加载...
取消
保存