mirror of
https://github.com/wassname/ray.git
synced 2026-07-25 13:30:52 +08:00
Automatically create custom node id resource (#5882)
* node id * comment * comments * fix tests
This commit is contained in:
@@ -496,6 +496,7 @@ class RayTrialExecutor(TrialExecutor):
|
||||
self._committed_resources.get_res_total(name),
|
||||
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 customs:
|
||||
status += " ({})".format(customs)
|
||||
|
||||
@@ -9,6 +9,7 @@ from numbers import Number
|
||||
# For compatibility under py2 to consider unicode as str
|
||||
from six import string_types
|
||||
|
||||
import ray
|
||||
from ray.tune import TuneError
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -111,6 +112,7 @@ class Resources(
|
||||
custom_summary = ", ".join([
|
||||
"{} {}".format(self.get_res_total(res), res)
|
||||
for res in self.custom_resources
|
||||
if not res.startswith(ray.resource_spec.NODE_ID_PREFIX)
|
||||
])
|
||||
if custom_summary:
|
||||
summary += " ({})".format(custom_summary)
|
||||
|
||||
Reference in New Issue
Block a user