[tune] filter placement group resources if not in use (#16996)

This commit is contained in:
Kai Fricke 2021-07-16 09:35:04 +02:00 committed by GitHub
parent 6d9fb421c6
commit 49b72eec16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -921,7 +921,8 @@ class RayTrialExecutor(TrialExecutor):
total_resources.get(name, 0.),
self._avail_resources.get_res_total(name), name)
for name in self._avail_resources.custom_resources
if not name.startswith(ray.resource_spec.NODE_ID_PREFIX)
if not name.startswith(ray.resource_spec.NODE_ID_PREFIX) and (
total_resources.get(name, 0.) > 0 or "_group_" not in name)
])
if customs:
status += " ({})".format(customs)