fix distro codegen deps

This commit is contained in:
Ashwin Bharambe 2025-03-01 12:44:58 -08:00
parent c4dd3f54af
commit ed16f04a66
12 changed files with 33 additions and 20 deletions

View file

@ -8,6 +8,8 @@ repos:
rev: v5.0.0 # Latest stable version rev: v5.0.0 # Latest stable version
hooks: hooks:
- id: check-merge-conflict - id: check-merge-conflict
- id: trailing-whitespace
exclude: '\.py$' # Exclude Python files as Ruff already handles them
- id: check-added-large-files - id: check-added-large-files
args: ['--maxkb=1000'] args: ['--maxkb=1000']
- id: end-of-file-fixer - id: end-of-file-fixer
@ -83,11 +85,8 @@ repos:
- id: distro-codegen - id: distro-codegen
name: Distribution Template Codegen name: Distribution Template Codegen
additional_dependencies: additional_dependencies:
- rich
- pydantic
- jinja2
- uv==0.6.0 - uv==0.6.0
entry: uv run python -m llama_stack.scripts.distro_codegen entry: uv run --extra codegen python -m llama_stack.scripts.distro_codegen
language: python language: python
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true

View file

@ -32,7 +32,7 @@ Llama Stack standardizes the core building blocks that simplify AI application d
By reducing friction and complexity, Llama Stack empowers developers to focus on what they do best: building transformative generative AI applications. By reducing friction and complexity, Llama Stack empowers developers to focus on what they do best: building transformative generative AI applications.
### API Providers ### API Providers
Here is a list of the various API providers and available distributions that can help developers get started easily with Llama Stack. Here is a list of the various API providers and available distributions that can help developers get started easily with Llama Stack.
| **API Provider Builder** | **Environments** | **Agents** | **Inference** | **Memory** | **Safety** | **Telemetry** | | **API Provider Builder** | **Environments** | **Agents** | **Inference** | **Memory** | **Safety** | **Telemetry** |
|:------------------------:|:----------------------:|:----------:|:-------------:|:----------:|:----------:|:-------------:| |:------------------------:|:----------------------:|:----------:|:-------------:|:----------:|:----------:|:-------------:|

View file

@ -36,7 +36,7 @@ Evaluates the outputs of the system.
Collects telemetry data from the system. Collects telemetry data from the system.
## Tool Runtime ## Tool Runtime
Is associated with the ToolGroup resouces. Is associated with the ToolGroup resouces.
## Vector IO ## Vector IO

View file

@ -1,10 +1,10 @@
--- ---
orphan: true orphan: true
--- ---
# Chroma # Chroma
[Chroma](https://www.trychroma.com/) is an inline and remote vector [Chroma](https://www.trychroma.com/) is an inline and remote vector
database provider for Llama Stack. It allows you to store and query vectors directly within a Chroma database. database provider for Llama Stack. It allows you to store and query vectors directly within a Chroma database.
That means you're not limited to storing vectors in memory or in a separate service. That means you're not limited to storing vectors in memory or in a separate service.
## Features ## Features

View file

@ -3,7 +3,7 @@ orphan: true
--- ---
# Faiss # Faiss
[Faiss](https://github.com/facebookresearch/faiss) is an inline vector database provider for Llama Stack. It [Faiss](https://github.com/facebookresearch/faiss) is an inline vector database provider for Llama Stack. It
allows you to store and query vectors directly in memory. allows you to store and query vectors directly in memory.
That means you'll get fast and efficient vector retrieval. That means you'll get fast and efficient vector retrieval.
@ -29,5 +29,5 @@ You can install Faiss using pip:
pip install faiss-cpu pip install faiss-cpu
``` ```
## Documentation ## Documentation
See [Faiss' documentation](https://faiss.ai/) or the [Faiss Wiki](https://github.com/facebookresearch/faiss/wiki) for See [Faiss' documentation](https://faiss.ai/) or the [Faiss Wiki](https://github.com/facebookresearch/faiss/wiki) for
more details about Faiss in general. more details about Faiss in general.

View file

@ -3,7 +3,7 @@ orphan: true
--- ---
# Postgres PGVector # Postgres PGVector
[PGVector](https://github.com/pgvector/pgvector) is a remote vector database provider for Llama Stack. It [PGVector](https://github.com/pgvector/pgvector) is a remote vector database provider for Llama Stack. It
allows you to store and query vectors directly in memory. allows you to store and query vectors directly in memory.
That means you'll get fast and efficient vector retrieval. That means you'll get fast and efficient vector retrieval.

View file

@ -3,7 +3,7 @@ orphan: true
--- ---
# Qdrant # Qdrant
[Qdrant](https://qdrant.tech/documentation/) is a remote vector database provider for Llama Stack. It [Qdrant](https://qdrant.tech/documentation/) is a remote vector database provider for Llama Stack. It
allows you to store and query vectors directly in memory. allows you to store and query vectors directly in memory.
That means you'll get fast and efficient vector retrieval. That means you'll get fast and efficient vector retrieval.

View file

@ -3,8 +3,8 @@ orphan: true
--- ---
# SQLite-Vec # SQLite-Vec
[SQLite-Vec](https://github.com/asg017/sqlite-vec) is an inline vector database provider for Llama Stack. It [SQLite-Vec](https://github.com/asg017/sqlite-vec) is an inline vector database provider for Llama Stack. It
allows you to store and query vectors directly within an SQLite database. allows you to store and query vectors directly within an SQLite database.
That means you're not limited to storing vectors in memory or in a separate service. That means you're not limited to storing vectors in memory or in a separate service.
## Features ## Features

View file

@ -1,10 +1,10 @@
--- ---
orphan: true orphan: true
--- ---
# Weaviate # Weaviate
[Weaviate](https://weaviate.io/) is a vector database provider for Llama Stack. [Weaviate](https://weaviate.io/) is a vector database provider for Llama Stack.
It allows you to store and query vectors directly within a Weaviate database. It allows you to store and query vectors directly within a Weaviate database.
That means you're not limited to storing vectors in memory or in a separate service. That means you're not limited to storing vectors in memory or in a separate service.
## Features ## Features
@ -27,7 +27,7 @@ To use Weaviate in your Llama Stack project, follow these steps:
## Installation ## Installation
To install Weaviate see the [Weaviate quickstart documentation](https://weaviate.io/developers/weaviate/quickstart). To install Weaviate see the [Weaviate quickstart documentation](https://weaviate.io/developers/weaviate/quickstart).
## Documentation ## Documentation
See [Weaviate's documentation](https://weaviate.io/developers/weaviate) for more details about Weaviate in general. See [Weaviate's documentation](https://weaviate.io/developers/weaviate) for more details about Weaviate in general.

View file

@ -4,13 +4,14 @@
# This source code is licensed under the terms described in the LICENSE file in # This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree. # the root directory of this source tree.
from .code_interpreter import CodeInterpreterToolRuntimeImpl
from .config import CodeInterpreterToolConfig from .config import CodeInterpreterToolConfig
__all__ = ["CodeInterpreterToolConfig", "CodeInterpreterToolRuntimeImpl"] __all__ = ["CodeInterpreterToolConfig", "CodeInterpreterToolRuntimeImpl"]
async def get_provider_impl(config: CodeInterpreterToolConfig, _deps): async def get_provider_impl(config: CodeInterpreterToolConfig, _deps):
from .code_interpreter import CodeInterpreterToolRuntimeImpl
impl = CodeInterpreterToolRuntimeImpl(config) impl = CodeInterpreterToolRuntimeImpl(config)
await impl.initialize() await impl.initialize()
return impl return impl

View file

@ -75,6 +75,11 @@ docs = [
"sphinxcontrib.mermaid", "sphinxcontrib.mermaid",
"tomli", "tomli",
] ]
codegen = [
"rich",
"pydantic",
"jinja2",
]
[project.urls] [project.urls]
Homepage = "https://github.com/meta-llama/llama-stack" Homepage = "https://github.com/meta-llama/llama-stack"

8
uv.lock generated
View file

@ -871,6 +871,11 @@ dependencies = [
] ]
[package.optional-dependencies] [package.optional-dependencies]
codegen = [
{ name = "jinja2" },
{ name = "pydantic" },
{ name = "rich" },
]
dev = [ dev = [
{ name = "black" }, { name = "black" },
{ name = "fastapi" }, { name = "fastapi" },
@ -923,6 +928,7 @@ requires-dist = [
{ name = "groq", marker = "extra == 'test'" }, { name = "groq", marker = "extra == 'test'" },
{ name = "httpx" }, { name = "httpx" },
{ name = "huggingface-hub" }, { name = "huggingface-hub" },
{ name = "jinja2", marker = "extra == 'codegen'" },
{ name = "jsonschema" }, { name = "jsonschema" },
{ name = "llama-stack-client", specifier = ">=0.1.4" }, { name = "llama-stack-client", specifier = ">=0.1.4" },
{ name = "lm-format-enforcer", marker = "extra == 'test'", specifier = ">=0.10.9" }, { name = "lm-format-enforcer", marker = "extra == 'test'", specifier = ">=0.10.9" },
@ -935,12 +941,14 @@ requires-dist = [
{ name = "pre-commit", marker = "extra == 'dev'" }, { name = "pre-commit", marker = "extra == 'dev'" },
{ name = "prompt-toolkit" }, { name = "prompt-toolkit" },
{ name = "pydantic", specifier = ">=2" }, { name = "pydantic", specifier = ">=2" },
{ name = "pydantic", marker = "extra == 'codegen'" },
{ name = "pytest", marker = "extra == 'dev'" }, { name = "pytest", marker = "extra == 'dev'" },
{ name = "pytest-asyncio", marker = "extra == 'dev'" }, { name = "pytest-asyncio", marker = "extra == 'dev'" },
{ name = "pytest-html", marker = "extra == 'dev'" }, { name = "pytest-html", marker = "extra == 'dev'" },
{ name = "python-dotenv" }, { name = "python-dotenv" },
{ name = "requests" }, { name = "requests" },
{ name = "rich" }, { name = "rich" },
{ name = "rich", marker = "extra == 'codegen'" },
{ name = "ruamel-yaml", marker = "extra == 'dev'" }, { name = "ruamel-yaml", marker = "extra == 'dev'" },
{ name = "ruff", marker = "extra == 'dev'" }, { name = "ruff", marker = "extra == 'dev'" },
{ name = "setuptools" }, { name = "setuptools" },