mirror of
https://github.com/wassname/ray.git
synced 2026-07-08 06:58:44 +08:00
[Tech Debt] Use f-string for python/ray/*.py (#10268)
* In progress. * Done with critical path. * Modified cluster_utils.py and log_monitor.py * Addressed code review.
This commit is contained in:
@@ -100,9 +100,10 @@ class RayTaskError(RayError):
|
||||
in_worker = False
|
||||
for line in lines:
|
||||
if line.startswith("Traceback "):
|
||||
out.append("{}{}{} (pid={}, ip={})".format(
|
||||
colorama.Fore.CYAN, self.proctitle, colorama.Fore.RESET,
|
||||
self.pid, self.ip))
|
||||
out.append(f"{colorama.Fore.CYAN}"
|
||||
f"{self.proctitle}"
|
||||
f"{colorama.Fore.RESET} "
|
||||
f"(pid={self.pid}, ip={self.ip})")
|
||||
elif in_worker:
|
||||
in_worker = False
|
||||
elif "ray/worker.py" in line or "ray/function_manager.py" in line:
|
||||
@@ -178,13 +179,13 @@ class UnreconstructableError(RayError):
|
||||
|
||||
def __str__(self):
|
||||
return (
|
||||
"Object {} is lost (either LRU evicted or deleted by user) and "
|
||||
f"Object {self.object_ref.hex()} is lost "
|
||||
"(either LRU evicted or deleted by user) and "
|
||||
"cannot be reconstructed. Try increasing the object store "
|
||||
"memory available with ray.init(object_store_memory=<bytes>) "
|
||||
"or setting object store limits with "
|
||||
"ray.remote(object_store_memory=<bytes>). See also: {}".format(
|
||||
self.object_ref.hex(),
|
||||
"https://docs.ray.io/en/latest/memory-management.html"))
|
||||
"ray.remote(object_store_memory=<bytes>). "
|
||||
"See also: https://docs.ray.io/en/latest/memory-management.html")
|
||||
|
||||
|
||||
class RayTimeoutError(RayError):
|
||||
|
||||
Reference in New Issue
Block a user