mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 17:18:45 +08:00
Partially Use f string (#10218)
* flynt. trial 1. * Trial 1. * Addressed code review.
This commit is contained in:
@@ -272,11 +272,10 @@ class FunctionActorManager:
|
||||
max_calls=0,
|
||||
))
|
||||
self._num_task_executions[job_id][function_id] = 0
|
||||
except Exception:
|
||||
logger.exception("Failed to load function %s.", function_name)
|
||||
raise RuntimeError(
|
||||
"Function {} failed to be loaded from local code.".format(
|
||||
function_descriptor))
|
||||
except Exception as e:
|
||||
raise RuntimeError(f"Function {function_descriptor} failed "
|
||||
"to be loaded from local code. "
|
||||
f"Error message: {str(e)}")
|
||||
|
||||
def _wait_for_function(self, function_descriptor, job_id, timeout=10):
|
||||
"""Wait until the function to be executed is present on this worker.
|
||||
@@ -445,11 +444,10 @@ class FunctionActorManager:
|
||||
return actor_class.__ray_metadata__.modified_class
|
||||
else:
|
||||
return actor_class
|
||||
except Exception:
|
||||
logger.exception("Failed to load actor_class %s.", class_name)
|
||||
except Exception as e:
|
||||
raise RuntimeError(
|
||||
"Actor {} failed to be imported from local code.".format(
|
||||
class_name))
|
||||
f"Actor {class_name} failed to be imported from local code."
|
||||
f"Error Message: {str(e)}")
|
||||
|
||||
def _create_fake_actor_class(self, actor_class_name, actor_method_names):
|
||||
class TemporaryActor:
|
||||
|
||||
Reference in New Issue
Block a user