From 591786810db18f63753ea3306c978831a7c3f8ca Mon Sep 17 00:00:00 2001 From: Jannik Peters Date: Mon, 31 Jul 2023 16:06:18 +0000 Subject: [PATCH] added num_gpus variable to ray init call --- marllib/marl/algos/run_cc.py | 2 +- marllib/marl/algos/run_il.py | 2 +- marllib/marl/algos/run_vd.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/marllib/marl/algos/run_cc.py b/marllib/marl/algos/run_cc.py index a01356a7..c8a22f2f 100644 --- a/marllib/marl/algos/run_cc.py +++ b/marllib/marl/algos/run_cc.py @@ -59,7 +59,7 @@ def restore_config_update(exp_info, run_config, stop_config): def run_cc(exp_info, env, model, stop=None): - ray.init(local_mode=exp_info["local_mode"]) + ray.init(local_mode=exp_info["local_mode"], num_gpus=exp_info["num_gpus"]) ######################## ### environment info ### diff --git a/marllib/marl/algos/run_il.py b/marllib/marl/algos/run_il.py index d926015e..43932f70 100644 --- a/marllib/marl/algos/run_il.py +++ b/marllib/marl/algos/run_il.py @@ -34,7 +34,7 @@ def run_il(exp_info, env, model, stop=None): - ray.init(local_mode=exp_info["local_mode"]) + ray.init(local_mode=exp_info["local_mode"], num_gpus=exp_info["num_gpus"]) ######################## ### environment info ### diff --git a/marllib/marl/algos/run_vd.py b/marllib/marl/algos/run_vd.py index d13dff6a..11ce9369 100644 --- a/marllib/marl/algos/run_vd.py +++ b/marllib/marl/algos/run_vd.py @@ -36,7 +36,7 @@ def run_vd(exp_info, env, model, stop=None): - ray.init(local_mode=exp_info["local_mode"]) + ray.init(local_mode=exp_info["local_mode"], num_gpus=exp_info["num_gpus"]) ######################## ### environment info ###