This commit is contained in:
Eric Liang
2017-11-20 21:15:54 -08:00
committed by GitHub
parent 316f9e2bb7
commit ad044cbe8f
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -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"))
-1
View File
@@ -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):