From 52344391b94a8249a5b05618062deee4289185c0 Mon Sep 17 00:00:00 2001 From: Dinesh Yeduguru Date: Mon, 4 Nov 2024 12:14:18 -0800 Subject: [PATCH] add comment about registry list return --- llama_stack/distribution/store/registry.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llama_stack/distribution/store/registry.py b/llama_stack/distribution/store/registry.py index e4881638f..d0c67a5c9 100644 --- a/llama_stack/distribution/store/registry.py +++ b/llama_stack/distribution/store/registry.py @@ -16,7 +16,12 @@ from llama_stack.providers.utils.kvstore import KVStore class DistributionRegistry(Protocol): + async def get(self, identifier: str) -> [RoutableObjectWithProvider]: ... + # The current data structure allows multiple objects with the same identifier but different providers. + # This is not ideal - we should have a single object that can be served by multiple providers, + # suggesting a data structure like (obj: Obj, providers: List[str]) rather than List[RoutableObjectWithProvider]. + # The current approach could lead to inconsistencies if the same logical object has different data across providers. async def register(self, obj: RoutableObjectWithProvider) -> None: ...