[RLlib] Fix use_lstm flag for ModelV2 (w/o ModelV1 wrapping) and add it for PyTorch. (#8734)

This commit is contained in:
Sven Mika
2020-06-05 15:40:30 +02:00
committed by GitHub
parent d78757623d
commit c74dc58f8b
21 changed files with 331 additions and 85 deletions
+9 -1
View File
@@ -49,6 +49,11 @@ def create_parser(parser_creator=None):
"--no-ray-ui",
action="store_true",
help="Whether to disable the Ray web ui.")
parser.add_argument(
"--local-mode",
action="store_true",
help="Whether to run ray with `local_mode=True`. "
"Only if --ray-num-nodes is not used.")
parser.add_argument(
"--ray-num-cpus",
default=None,
@@ -178,6 +183,8 @@ def run(args, parser):
exp["config"]["framework"] = "tfe"
elif args.torch:
exp["config"]["framework"] = "torch"
else:
exp["config"]["framework"] = "tf"
if args.v:
exp["config"]["log_level"] = "INFO"
verbose = 2
@@ -207,7 +214,8 @@ def run(args, parser):
memory=args.ray_memory,
redis_max_memory=args.ray_redis_max_memory,
num_cpus=args.ray_num_cpus,
num_gpus=args.ray_num_gpus)
num_gpus=args.ray_num_gpus,
local_mode=args.local_mode)
run_experiments(
experiments,
scheduler=_make_scheduler(args),