mirror of
https://github.com/wassname/ray.git
synced 2026-06-30 18:51:39 +08:00
Fix to json decoding bug (#597)
* fix json decoding bug * Fix linting error.
This commit is contained in:
committed by
Philipp Moritz
parent
1985838a30
commit
f97d0393cc
+2
-1
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user