mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-30 23:51:00 +00:00
fix linter errors
This commit is contained in:
parent
52344391b9
commit
8ff1b3af13
4 changed files with 9 additions and 11 deletions
|
@ -147,7 +147,6 @@ a default SQLite store will be used.""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class BuildConfig(BaseModel):
|
class BuildConfig(BaseModel):
|
||||||
version: str = LLAMA_STACK_BUILD_CONFIG_VERSION
|
version: str = LLAMA_STACK_BUILD_CONFIG_VERSION
|
||||||
name: str
|
name: str
|
||||||
|
|
|
@ -8,7 +8,7 @@ from typing import Any
|
||||||
|
|
||||||
from llama_stack.distribution.datatypes import * # noqa: F403
|
from llama_stack.distribution.datatypes import * # noqa: F403
|
||||||
|
|
||||||
from llama_stack.distribution.store import DistributionRegistry
|
from llama_stack.distribution.store import DistributionRegistry
|
||||||
|
|
||||||
from .routing_tables import (
|
from .routing_tables import (
|
||||||
DatasetsRoutingTable,
|
DatasetsRoutingTable,
|
||||||
|
|
|
@ -283,19 +283,17 @@ def main(
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
# instantiate kvstore for storing and retrieving distribution metadata
|
# instantiate kvstore for storing and retrieving distribution metadata
|
||||||
if config.distribution_registry_store:
|
if config.distribution_registry_store:
|
||||||
dist_kvstore = asyncio.run(
|
dist_kvstore = asyncio.run(kvstore_impl(config.distribution_registry_store))
|
||||||
kvstore_impl(config.distribution_registry_store)
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
dist_kvstore = asyncio.run(
|
dist_kvstore = asyncio.run(
|
||||||
kvstore_impl(
|
kvstore_impl(
|
||||||
SqliteKVStoreConfig(
|
SqliteKVStoreConfig(
|
||||||
db_path=(
|
db_path=(
|
||||||
DISTRIBS_BASE_DIR / config.image_name / "kvstore.db"
|
DISTRIBS_BASE_DIR / config.image_name / "kvstore.db"
|
||||||
).as_posix()
|
).as_posix()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
dist_registry = DiskDistributionRegistry(dist_kvstore)
|
dist_registry = DiskDistributionRegistry(dist_kvstore)
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,9 @@ from llama_stack.providers.utils.kvstore import KVStore
|
||||||
|
|
||||||
|
|
||||||
class DistributionRegistry(Protocol):
|
class DistributionRegistry(Protocol):
|
||||||
|
|
||||||
async def get(self, identifier: str) -> [RoutableObjectWithProvider]: ...
|
async def get(self, identifier: str) -> [RoutableObjectWithProvider]: ...
|
||||||
|
|
||||||
# The current data structure allows multiple objects with the same identifier but different providers.
|
# 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,
|
# 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].
|
# suggesting a data structure like (obj: Obj, providers: List[str]) rather than List[RoutableObjectWithProvider].
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue