[Core] Fix random bugs found. (#11128)

This commit is contained in:
SangBin Cho authored and GitHub committed 2020-09-30 00:11:57 -07:00
1 parent 3504391fd2
commit 474af36591
2 files changed
+7 -3

No files matched your search

@@ -32,10 +32,14 @@ class LoadMetrics:
static_resources,
dynamic_resources,
resource_load,
waiting_bundles=[],
infeasible_bundles=[]):
waiting_bundles=None,
infeasible_bundles=None):
self.resource_load_by_ip[ip] = resource_load
self.static_resources_by_ip[ip] = static_resources
if not waiting_bundles:
waiting_bundles = []
if not infeasible_bundles:
infeasible_bundles = []
# We are not guaranteed to have a corresponding dynamic resource for
# every static resource because dynamic resources are based on the
+1 -1
View File
@@ -51,7 +51,7 @@ class PlacementGroup:
resource_name, value = self._get_none_zero_resource(bundle)
num_cpus = 0
num_gpus = 0
resources = None
resources = {}
if resource_name == "CPU":
num_cpus = value
elif resource_name == "GPU":