mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 18:00:36 +00:00
Migrates package structure to src/ layout following Python packaging best practices. All code moved from `llama_stack/` to `src/llama_stack/`. Public API unchanged - imports remain `import llama_stack.*`. Updated build configs, pre-commit hooks, scripts, and GitHub workflows accordingly. All hooks pass, package builds cleanly. **Developer note**: Reinstall after pulling: `pip install -e .`
40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the terms described in the LICENSE file in
|
|
# the root directory of this source tree.
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
from llama_stack.core.storage.datatypes import KVStoreReference
|
|
|
|
|
|
class ReferenceBatchesImplConfig(BaseModel):
|
|
"""Configuration for the Reference Batches implementation."""
|
|
|
|
kvstore: KVStoreReference = Field(
|
|
description="Configuration for the key-value store backend.",
|
|
)
|
|
|
|
max_concurrent_batches: int = Field(
|
|
default=1,
|
|
description="Maximum number of concurrent batches to process simultaneously.",
|
|
ge=1,
|
|
)
|
|
|
|
max_concurrent_requests_per_batch: int = Field(
|
|
default=10,
|
|
description="Maximum number of concurrent requests to process per batch.",
|
|
ge=1,
|
|
)
|
|
|
|
# TODO: add a max requests per second rate limiter
|
|
|
|
@classmethod
|
|
def sample_run_config(cls, __distro_dir__: str) -> dict:
|
|
return {
|
|
"kvstore": KVStoreReference(
|
|
backend="kv_default",
|
|
namespace="batches",
|
|
).model_dump(exclude_none=True),
|
|
}
|