mirror of
https://github.com/wassname/ray.git
synced 2026-07-15 11:25:40 +08:00
Metrics Export Service (#7809)
This commit is contained in:
@@ -85,10 +85,10 @@ class RayServeHandle:
|
||||
# If both the slo's are None then then we use a high default
|
||||
# value so other queries can be prioritize and put in front of these
|
||||
# queries.
|
||||
assert not all(absolute_slo_ms,
|
||||
relative_slo_ms), ("Can't specify both "
|
||||
"relative and absolute "
|
||||
"slo's together!")
|
||||
assert not all([absolute_slo_ms, relative_slo_ms
|
||||
]), ("Can't specify both "
|
||||
"relative and absolute "
|
||||
"slo's together!")
|
||||
|
||||
# Don't override existing method
|
||||
if method_name is None and self.method_name is not None:
|
||||
|
||||
@@ -113,15 +113,16 @@ class RayServeMixin:
|
||||
"which is specified in the request. "
|
||||
"The avaiable methods are {}".format(
|
||||
method_name, dir(self)))
|
||||
|
||||
if method_name != "__call__":
|
||||
return getattr(self, method_name)
|
||||
else:
|
||||
# For simple callables, we should just return the object so
|
||||
# signature recoding will continue to funciton.
|
||||
return self
|
||||
return getattr(self, method_name)
|
||||
|
||||
def _ray_serve_count_num_positional(self, f):
|
||||
# NOTE:
|
||||
# In the case of simple functions, not actors, the f will be
|
||||
# a TaskRunner.__call__. What we really want here is the wrapped
|
||||
# functionso inspect.signature will figure out the underlying f.
|
||||
if hasattr(self, "__wrapped__"):
|
||||
f = self.__wrapped__
|
||||
|
||||
signature = inspect.signature(f)
|
||||
counter = 0
|
||||
for param in signature.parameters.values():
|
||||
|
||||
Reference in New Issue
Block a user