浏览代码

Learn.py now takes a config file as a required arg.

/develop-generalizationTraining-TrainerController
Deric Pang 6 年前
当前提交
ea722da3
共有 1 个文件被更改,包括 3 次插入7 次删除
  1. 10
      mlagents/learn.py

10
mlagents/learn.py


logger = logging.getLogger("mlagents.learn")
_USAGE = '''
Usage:
learn (<env>) [options]
learn (<trainer-config-path>) [<env>] [options]
learn [options]
learn --help

lesson = int(options['--lesson'])
fast_simulation = not bool(options['--slow'])
no_graphics = options['--no-graphics']
# Constants
# Assumption that this yaml is present in same dir as this file
base_path = os.path.dirname(__file__)
TRAINER_CONFIG_PATH = os.path.abspath(os.path.join(base_path, "trainer_config.yaml"))
trainer_config_path = options['<trainer-config-path>']
docker_target_name, TRAINER_CONFIG_PATH, no_graphics)
docker_target_name, trainer_config_path, no_graphics)
tc.start_learning()

正在加载...
取消
保存