Partially Use f string (#10218)

* flynt. trial 1.

* Trial 1.

* Addressed code review.
This commit is contained in:
SangBin Cho
2020-08-20 18:21:16 -07:00
committed by GitHub
parent 07cd815e5a
commit 92664249e8
41 changed files with 195 additions and 238 deletions
+7 -9
View File
@@ -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: