From a3cee70014748cca17fc954272002ac430a39c84 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Fri, 11 Apr 2025 17:13:46 -0700 Subject: [PATCH] kill experimental attr on webmethod --- llama_stack/apis/inference/inference.py | 4 ++-- llama_stack/distribution/resolver.py | 3 --- llama_stack/schema_utils.py | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/llama_stack/apis/inference/inference.py b/llama_stack/apis/inference/inference.py index 21753ca23..9eb3910c6 100644 --- a/llama_stack/apis/inference/inference.py +++ b/llama_stack/apis/inference/inference.py @@ -726,7 +726,7 @@ class Inference(Protocol): """ ... - @webmethod(route="/inference/batch-completion", method="POST", experimental=True) + @webmethod(route="/inference/batch-completion", method="POST") async def batch_completion( self, model_id: str, @@ -777,7 +777,7 @@ class Inference(Protocol): """ ... - @webmethod(route="/inference/batch-chat-completion", method="POST", experimental=True) + @webmethod(route="/inference/batch-chat-completion", method="POST") async def batch_chat_completion( self, model_id: str, diff --git a/llama_stack/distribution/resolver.py b/llama_stack/distribution/resolver.py index 177d20f2b..33ad343ec 100644 --- a/llama_stack/distribution/resolver.py +++ b/llama_stack/distribution/resolver.py @@ -400,9 +400,6 @@ def check_protocol_compliance(obj: Any, protocol: Any) -> None: mro = type(obj).__mro__ for name, value in inspect.getmembers(protocol): if inspect.isfunction(value) and hasattr(value, "__webmethod__"): - if value.__webmethod__.experimental: - continue - if not hasattr(obj, name): missing_methods.append((name, "missing")) elif not callable(getattr(obj, name)): diff --git a/llama_stack/schema_utils.py b/llama_stack/schema_utils.py index 40d604c3c..8fd55add0 100644 --- a/llama_stack/schema_utils.py +++ b/llama_stack/schema_utils.py @@ -20,7 +20,6 @@ class WebMethod: raw_bytes_request_body: Optional[bool] = False # A descriptive name of the corresponding span created by tracing descriptive_name: Optional[str] = None - experimental: Optional[bool] = False T = TypeVar("T", bound=Callable[..., Any]) @@ -34,7 +33,6 @@ def webmethod( response_examples: Optional[List[Any]] = None, raw_bytes_request_body: Optional[bool] = False, descriptive_name: Optional[str] = None, - experimental: Optional[bool] = False, ) -> Callable[[T], T]: """ Decorator that supplies additional metadata to an endpoint operation function. @@ -54,7 +52,6 @@ def webmethod( response_examples=response_examples, raw_bytes_request_body=raw_bytes_request_body, descriptive_name=descriptive_name, - experimental=experimental, ) return func