From f97d0393cca2fe2a025118a29f192452a91d5141 Mon Sep 17 00:00:00 2001 From: Chelsea Finn Date: Thu, 25 May 2017 18:48:39 -0700 Subject: [PATCH] Fix to json decoding bug (#597) * fix json decoding bug * Fix linting error. --- python/ray/actor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ray/actor.py b/python/ray/actor.py index f0fc2426e..c52d7ba2a 100644 --- a/python/ray/actor.py +++ b/python/ray/actor.py @@ -121,7 +121,8 @@ def attempt_to_reserve_gpus(num_gpus, driver_id, local_scheduler, worker): # Figure out which GPUs are currently in use. result = worker.redis_client.hget(local_scheduler_id, "gpus_in_use") - gpus_in_use = dict() if result is None else json.loads(result) + gpus_in_use = dict() if result is None else json.loads( + result.decode("ascii")) num_gpus_in_use = 0 for key in gpus_in_use: num_gpus_in_use += gpus_in_use[key]