mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 02:22:38 +00:00
fix: only prevent double registration with differences
we allow registration of something if it already exists we reject registration of the same identifier if there are differences closes #3749
This commit is contained in:
parent
96886afaca
commit
04af470add
2 changed files with 4 additions and 4 deletions
|
|
@ -9,7 +9,6 @@ from typing import Any
|
|||
from llama_stack.apis.common.errors import ModelNotFoundError
|
||||
from llama_stack.apis.models import Model
|
||||
from llama_stack.apis.resource import ResourceType
|
||||
from llama_stack.apis.scoring_functions import ScoringFn
|
||||
from llama_stack.core.access_control.access_control import AccessDeniedError, is_action_allowed
|
||||
from llama_stack.core.access_control.datatypes import Action
|
||||
from llama_stack.core.datatypes import (
|
||||
|
|
@ -17,6 +16,7 @@ from llama_stack.core.datatypes import (
|
|||
RoutableObject,
|
||||
RoutableObjectWithProvider,
|
||||
RoutedProtocol,
|
||||
ScoringFnWithOwner,
|
||||
)
|
||||
from llama_stack.core.request_headers import get_authenticated_user
|
||||
from llama_stack.core.store import DistributionRegistry
|
||||
|
|
@ -114,7 +114,7 @@ class CommonRoutingTableImpl(RoutingTable):
|
|||
elif api == Api.scoring:
|
||||
p.scoring_function_store = self
|
||||
scoring_functions = await p.list_scoring_functions()
|
||||
await add_objects(scoring_functions, pid, ScoringFn)
|
||||
await add_objects(scoring_functions, pid, ScoringFnWithOwner)
|
||||
elif api == Api.eval:
|
||||
p.benchmark_store = self
|
||||
elif api == Api.tool_runtime:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue