diff --git a/llama_stack/apis/scoring_functions/scoring_functions.py b/llama_stack/apis/scoring_functions/scoring_functions.py index b2aa04a5f..37c2fae84 100644 --- a/llama_stack/apis/scoring_functions/scoring_functions.py +++ b/llama_stack/apis/scoring_functions/scoring_functions.py @@ -12,8 +12,8 @@ from typing import ( Literal, Optional, Protocol, - runtime_checkable, Union, + runtime_checkable, ) from pydantic import BaseModel, Field @@ -22,7 +22,6 @@ from typing_extensions import Annotated from llama_stack.apis.resource import Resource, ResourceType from llama_stack.schema_utils import json_schema_type, register_schema, webmethod - # Perhaps more structure can be imposed on these functions. Maybe they could be associated # with standard metrics so they can be rolled up? @@ -219,9 +218,7 @@ class CommonScoringFnFields(BaseModel): @json_schema_type class ScoringFn(CommonScoringFnFields, Resource): - type: Literal[ResourceType.scoring_function.value] = ( - ResourceType.scoring_function.value - ) + type: Literal[ResourceType.scoring_function.value] = ResourceType.scoring_function.value @property def scoring_fn_id(self) -> str: @@ -248,9 +245,7 @@ class ScoringFunctions(Protocol): async def list_scoring_functions(self) -> ListScoringFunctionsResponse: ... @webmethod(route="/scoring-functions/{scoring_fn_id:path}", method="GET") - async def get_scoring_function( - self, scoring_fn_id: str, / - ) -> Optional[ScoringFn]: ... + async def get_scoring_function(self, scoring_fn_id: str, /) -> Optional[ScoringFn]: ... @webmethod(route="/scoring-functions", method="POST") async def register_scoring_function(