From ad044cbe8f9b39ffbfd12ba68af2b88986eda96c Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Mon, 20 Nov 2017 21:15:54 -0800 Subject: [PATCH] changes (#1237) --- python/ray/tune/config_parser.py | 2 +- python/ray/tune/trial_runner.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/python/ray/tune/config_parser.py b/python/ray/tune/config_parser.py index 484b47362..05552c3b1 100644 --- a/python/ray/tune/config_parser.py +++ b/python/ray/tune/config_parser.py @@ -19,7 +19,7 @@ def json_to_resources(data): "Unknown resource type {}, must be one of {}".format( k, Resources._fields)) return Resources( - data.get("cpu", 0), data.get("gpu", 0), + data.get("cpu", 1), data.get("gpu", 0), data.get("driver_cpu_limit"), data.get("driver_gpu_limit")) diff --git a/python/ray/tune/trial_runner.py b/python/ray/tune/trial_runner.py index c8f5ad912..557ce8a64 100644 --- a/python/ray/tune/trial_runner.py +++ b/python/ray/tune/trial_runner.py @@ -129,7 +129,6 @@ class TrialRunner(object): cpu_avail = self._avail_resources.cpu - self._committed_resources.cpu gpu_avail = self._avail_resources.gpu - self._committed_resources.gpu - assert cpu_avail >= 0 and gpu_avail >= 0 return resources.cpu <= cpu_avail and resources.gpu <= gpu_avail def _can_launch_more(self):