def main(argv): if len(argv) > 1: raise app.UsageError('Too many command-line arguments.') if FLAGS.run_mode == 'actor': actor.actor_loop(env.create_environment) elif FLAGS.run_mode == 'learner': learner.learner_loop(env.create_environment, create_agent, create_optimizer) else: raise ValueError('Unsupported run mode {}'.format(FLAGS.run_mode))
def main(argv): fps_log = Logger('fps.log', level='info') if len(argv) > 1: raise app.UsageError('Too many command-line arguments.') if FLAGS.run_mode == 'actor': actor.actor_loop(create_atari_env) elif FLAGS.run_mode == 'learner': learner.learner_loop(create_atari_env, create_agent, create_optimizer, fps_log) else: raise ValueError('Unsupported run mode {}'.format(FLAGS.run_mode))
def main(argv): create_environment = lambda task, config: env.create_environment( env_name=config.env_name, discretization=config.discretization, n_actions_per_dim=config.n_actions_per_dim, action_ratio=config.action_ratio) if len(argv) > 1: raise app.UsageError('Too many command-line arguments.') if FLAGS.run_mode == 'actor': actor.actor_loop(create_environment) elif FLAGS.run_mode == 'learner': learner.learner_loop(create_environment, create_agent, create_optimizer) else: raise ValueError('Unsupported run mode {}'.format(FLAGS.run_mode))
def main(argv): if len(argv) > 1: raise app.UsageError('Too many command-line arguments.') if FLAGS.run_mode == 'actor': actor.actor_loop(env.create_environment) elif FLAGS.run_mode == 'learner': neptune.init('do-not-be-hasty/matrace') neptune.create_experiment(tags=[FLAGS.nonce]) neptune_tensorboard.integrate_with_tensorflow() learner.learner_loop(env.create_environment, create_agent, create_optimizer) elif FLAGS.run_mode == 'visualize': visualize.visualize(env.create_environment, create_agent, create_optimizer) else: raise ValueError('Unsupported run mode {}'.format(FLAGS.run_mode))
def main(argv): if len(argv) > 1: raise app.UsageError('Too many command-line arguments.') if FLAGS.run_mode == 'actor': if not FLAGS.is_local: get_configuration(config_file=FLAGS.mrunner_config, inject_parameters_to_FLAGS=True) actor.actor_loop(env.create_environment) elif FLAGS.run_mode == 'learner': if not FLAGS.is_local: get_configuration(config_file=FLAGS.mrunner_config, print_diagnostics=True, with_neptune=True, inject_parameters_to_FLAGS=True) experiment = neptune.get_experiment() experiment.append_tag(tag=FLAGS.nonce) neptune_tensorboard.integrate_with_tensorflow() learner.learner_loop(env.create_environment, create_agent, create_optimizer) elif FLAGS.run_mode == 'visualize': visualize.visualize(env.create_environment, create_agent, create_optimizer) else: raise ValueError('Unsupported run mode {}'.format(FLAGS.run_mode))