simplified some, walked back some decisions

This commit is contained in:
Ashwin Bharambe 2025-10-17 10:05:07 -07:00
parent af7472cdb0
commit 636764c2a1
90 changed files with 887 additions and 570 deletions

View file

@ -52,5 +52,6 @@ distribution_spec:
- provider_type: inline::reference
image_type: venv
additional_pip_packages:
- aiosqlite
- asyncpg
- sqlalchemy[asyncio]

View file

@ -95,24 +95,28 @@ providers:
config:
kvstore:
namespace: vector_io::faiss
backend: kv_default
- provider_id: sqlite-vec
provider_type: inline::sqlite-vec
config:
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/sqlite_vec.db
kvstore:
namespace: vector_io::sqlite_vec
backend: kv_default
- provider_id: ${env.MILVUS_URL:+milvus}
provider_type: inline::milvus
config:
db_path: ${env.MILVUS_DB_PATH:=~/.llama/distributions/ci-tests}/milvus.db
kvstore:
namespace: vector_io::milvus
backend: kv_default
- provider_id: ${env.CHROMADB_URL:+chromadb}
provider_type: remote::chromadb
config:
url: ${env.CHROMADB_URL:=}
kvstore:
namespace: vector_io::chroma_remote
backend: kv_default
- provider_id: ${env.PGVECTOR_DB:+pgvector}
provider_type: remote::pgvector
config:
@ -123,6 +127,7 @@ providers:
password: ${env.PGVECTOR_PASSWORD:=}
kvstore:
namespace: vector_io::pgvector
backend: kv_default
files:
- provider_id: meta-reference-files
provider_type: inline::localfs
@ -130,6 +135,7 @@ providers:
storage_dir: ${env.FILES_STORAGE_DIR:=~/.llama/distributions/ci-tests/files}
metadata_store:
table_name: files_metadata
backend: sql_default
safety:
- provider_id: llama-guard
provider_type: inline::llama-guard
@ -144,8 +150,12 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
post_training:
- provider_id: torchtune-cpu
provider_type: inline::torchtune-cpu
@ -157,17 +167,20 @@ providers:
config:
kvstore:
namespace: eval
backend: kv_default
datasetio:
- provider_id: huggingface
provider_type: remote::huggingface
config:
kvstore:
namespace: datasetio::huggingface
backend: kv_default
- provider_id: localfs
provider_type: inline::localfs
config:
kvstore:
namespace: datasetio::localfs
backend: kv_default
scoring:
- provider_id: basic
provider_type: inline::basic
@ -198,25 +211,26 @@ providers:
config:
kvstore:
namespace: batches
backend: kv_default
storage:
backends:
default_kv_store:
kv_default:
type: kv_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/kvstore.db
default_sql_store:
sql_default:
type: sql_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/sql_store.db
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models: []
shields:
- shield_id: llama-guard

View file

@ -28,4 +28,6 @@ distribution_spec:
- provider_type: remote::tavily-search
- provider_type: inline::rag-runtime
image_type: venv
additional_pip_packages: []
additional_pip_packages:
- aiosqlite
- sqlalchemy[asyncio]

View file

@ -28,6 +28,7 @@ providers:
url: ${env.CHROMADB_URL:=}
kvstore:
namespace: vector_io::chroma_remote
backend: kv_default
safety:
- provider_id: llama-guard
provider_type: inline::llama-guard
@ -40,25 +41,32 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
eval:
- provider_id: meta-reference
provider_type: inline::meta-reference
config:
kvstore:
namespace: eval
backend: kv_default
datasetio:
- provider_id: huggingface
provider_type: remote::huggingface
config:
kvstore:
namespace: datasetio::huggingface
backend: kv_default
- provider_id: localfs
provider_type: inline::localfs
config:
kvstore:
namespace: datasetio::localfs
backend: kv_default
scoring:
- provider_id: basic
provider_type: inline::basic
@ -83,23 +91,23 @@ providers:
provider_type: inline::rag-runtime
storage:
backends:
default_kv_store:
kv_default:
type: kv_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/kvstore.db
default_sql_store:
sql_default:
type: sql_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/sql_store.db
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models:
- metadata: {}
model_id: ${env.INFERENCE_MODEL}

View file

@ -24,6 +24,7 @@ providers:
url: ${env.CHROMADB_URL:=}
kvstore:
namespace: vector_io::chroma_remote
backend: kv_default
safety:
- provider_id: llama-guard
provider_type: inline::llama-guard
@ -36,25 +37,32 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
eval:
- provider_id: meta-reference
provider_type: inline::meta-reference
config:
kvstore:
namespace: eval
backend: kv_default
datasetio:
- provider_id: huggingface
provider_type: remote::huggingface
config:
kvstore:
namespace: datasetio::huggingface
backend: kv_default
- provider_id: localfs
provider_type: inline::localfs
config:
kvstore:
namespace: datasetio::localfs
backend: kv_default
scoring:
- provider_id: basic
provider_type: inline::basic
@ -79,23 +87,23 @@ providers:
provider_type: inline::rag-runtime
storage:
backends:
default_kv_store:
kv_default:
type: kv_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/kvstore.db
default_sql_store:
sql_default:
type: sql_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/sql_store.db
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models:
- metadata: {}
model_id: ${env.INFERENCE_MODEL}

View file

@ -27,4 +27,6 @@ distribution_spec:
- provider_type: inline::rag-runtime
- provider_type: remote::model-context-protocol
image_type: venv
additional_pip_packages: []
additional_pip_packages:
- aiosqlite
- sqlalchemy[asyncio]

View file

@ -39,6 +39,7 @@ providers:
config:
kvstore:
namespace: vector_io::faiss
backend: kv_default
safety:
- provider_id: llama-guard
provider_type: inline::llama-guard
@ -51,25 +52,32 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
eval:
- provider_id: meta-reference
provider_type: inline::meta-reference
config:
kvstore:
namespace: eval
backend: kv_default
datasetio:
- provider_id: huggingface
provider_type: remote::huggingface
config:
kvstore:
namespace: datasetio::huggingface
backend: kv_default
- provider_id: localfs
provider_type: inline::localfs
config:
kvstore:
namespace: datasetio::localfs
backend: kv_default
scoring:
- provider_id: basic
provider_type: inline::basic
@ -96,23 +104,23 @@ providers:
provider_type: remote::model-context-protocol
storage:
backends:
default_kv_store:
kv_default:
type: kv_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/kvstore.db
default_sql_store:
sql_default:
type: sql_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/sql_store.db
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models:
- metadata: {}
model_id: ${env.INFERENCE_MODEL}

View file

@ -29,6 +29,7 @@ providers:
config:
kvstore:
namespace: vector_io::faiss
backend: kv_default
safety:
- provider_id: llama-guard
provider_type: inline::llama-guard
@ -41,25 +42,32 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
eval:
- provider_id: meta-reference
provider_type: inline::meta-reference
config:
kvstore:
namespace: eval
backend: kv_default
datasetio:
- provider_id: huggingface
provider_type: remote::huggingface
config:
kvstore:
namespace: datasetio::huggingface
backend: kv_default
- provider_id: localfs
provider_type: inline::localfs
config:
kvstore:
namespace: datasetio::localfs
backend: kv_default
scoring:
- provider_id: basic
provider_type: inline::basic
@ -86,23 +94,23 @@ providers:
provider_type: remote::model-context-protocol
storage:
backends:
default_kv_store:
kv_default:
type: kv_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/kvstore.db
default_sql_store:
sql_default:
type: sql_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/sql_store.db
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models:
- metadata: {}
model_id: ${env.INFERENCE_MODEL}

View file

@ -24,4 +24,6 @@ distribution_spec:
files:
- provider_type: inline::localfs
image_type: venv
additional_pip_packages: []
additional_pip_packages:
- aiosqlite
- sqlalchemy[asyncio]

View file

@ -30,6 +30,7 @@ providers:
config:
kvstore:
namespace: vector_io::faiss
backend: kv_default
safety:
- provider_id: nvidia
provider_type: remote::nvidia
@ -43,8 +44,12 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
eval:
- provider_id: nvidia
provider_type: remote::nvidia
@ -64,6 +69,7 @@ providers:
config:
kvstore:
namespace: datasetio::localfs
backend: kv_default
- provider_id: nvidia
provider_type: remote::nvidia
config:
@ -84,25 +90,26 @@ providers:
storage_dir: ${env.FILES_STORAGE_DIR:=~/.llama/distributions/nvidia/files}
metadata_store:
table_name: files_metadata
backend: sql_default
storage:
backends:
default_kv_store:
kv_default:
type: kv_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/kvstore.db
default_sql_store:
sql_default:
type: sql_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/sql_store.db
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models:
- metadata: {}
model_id: ${env.INFERENCE_MODEL}

View file

@ -25,6 +25,7 @@ providers:
config:
kvstore:
namespace: vector_io::faiss
backend: kv_default
safety:
- provider_id: nvidia
provider_type: remote::nvidia
@ -38,8 +39,12 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
eval:
- provider_id: nvidia
provider_type: remote::nvidia
@ -74,25 +79,26 @@ providers:
storage_dir: ${env.FILES_STORAGE_DIR:=~/.llama/distributions/nvidia/files}
metadata_store:
table_name: files_metadata
backend: sql_default
storage:
backends:
default_kv_store:
kv_default:
type: kv_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/kvstore.db
default_sql_store:
sql_default:
type: sql_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/sql_store.db
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models: []
shields: []
vector_dbs: []

View file

@ -31,4 +31,6 @@ distribution_spec:
- provider_type: inline::rag-runtime
- provider_type: remote::model-context-protocol
image_type: venv
additional_pip_packages: []
additional_pip_packages:
- aiosqlite
- sqlalchemy[asyncio]

View file

@ -41,12 +41,14 @@ providers:
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/sqlite_vec.db
kvstore:
namespace: vector_io::sqlite_vec
backend: kv_default
- provider_id: ${env.ENABLE_CHROMADB:+chromadb}
provider_type: remote::chromadb
config:
url: ${env.CHROMADB_URL:=}
kvstore:
namespace: vector_io::chroma_remote
backend: kv_default
- provider_id: ${env.ENABLE_PGVECTOR:+pgvector}
provider_type: remote::pgvector
config:
@ -57,6 +59,7 @@ providers:
password: ${env.PGVECTOR_PASSWORD:=}
kvstore:
namespace: vector_io::pgvector
backend: kv_default
safety:
- provider_id: llama-guard
provider_type: inline::llama-guard
@ -69,25 +72,32 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
eval:
- provider_id: meta-reference
provider_type: inline::meta-reference
config:
kvstore:
namespace: eval
backend: kv_default
datasetio:
- provider_id: huggingface
provider_type: remote::huggingface
config:
kvstore:
namespace: datasetio::huggingface
backend: kv_default
- provider_id: localfs
provider_type: inline::localfs
config:
kvstore:
namespace: datasetio::localfs
backend: kv_default
scoring:
- provider_id: basic
provider_type: inline::basic
@ -114,23 +124,23 @@ providers:
provider_type: remote::model-context-protocol
storage:
backends:
default_kv_store:
kv_default:
type: kv_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/kvstore.db
default_sql_store:
sql_default:
type: sql_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/sql_store.db
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models:
- metadata: {}
model_id: gpt-4o

View file

@ -17,4 +17,7 @@ distribution_spec:
- provider_type: inline::rag-runtime
- provider_type: remote::model-context-protocol
image_type: venv
additional_pip_packages: []
additional_pip_packages:
- asyncpg
- psycopg2-binary
- sqlalchemy[asyncio]

View file

@ -91,7 +91,6 @@ def get_distribution_template() -> DistributionTemplate:
"embedding_dimension": 768,
},
)
postgres_config = PostgresSqlStoreConfig.sample_run_config()
return DistributionTemplate(
name=name,
distro_type="self_hosted",
@ -109,13 +108,11 @@ def get_distribution_template() -> DistributionTemplate:
default_models=default_models + [embedding_model],
default_tool_groups=default_tool_groups,
default_shields=[ShieldInput(shield_id="meta-llama/Llama-Guard-3-8B")],
metadata_store=PostgresKVStoreConfig.sample_run_config(),
inference_store=postgres_config,
storage_backends={
"default_kv_store": PostgresKVStoreConfig.sample_run_config(
"kv_default": PostgresKVStoreConfig.sample_run_config(
table_name="llamastack_kvstore",
),
"default_sql_store": PostgresSqlStoreConfig.sample_run_config(),
"sql_default": PostgresSqlStoreConfig.sample_run_config(),
},
),
},

View file

@ -24,6 +24,7 @@ providers:
url: ${env.CHROMADB_URL:=}
kvstore:
namespace: vector_io::chroma_remote
backend: kv_default
safety:
- provider_id: llama-guard
provider_type: inline::llama-guard
@ -36,8 +37,12 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
tool_runtime:
- provider_id: brave-search
provider_type: remote::brave-search
@ -55,7 +60,7 @@ providers:
provider_type: remote::model-context-protocol
storage:
backends:
default_kv_store:
kv_default:
type: kv_postgres
host: ${env.POSTGRES_HOST:=localhost}
port: ${env.POSTGRES_PORT:=5432}
@ -63,24 +68,24 @@ storage:
user: ${env.POSTGRES_USER:=llamastack}
password: ${env.POSTGRES_PASSWORD:=llamastack}
table_name: ${env.POSTGRES_TABLE_NAME:=llamastack_kvstore}
default_sql_store:
sql_default:
type: sql_postgres
host: ${env.POSTGRES_HOST:=localhost}
port: ${env.POSTGRES_PORT:=5432}
db: ${env.POSTGRES_DB:=llamastack}
user: ${env.POSTGRES_USER:=llamastack}
password: ${env.POSTGRES_PASSWORD:=llamastack}
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models:
- metadata: {}
model_id: ${env.INFERENCE_MODEL}

View file

@ -53,5 +53,6 @@ distribution_spec:
- provider_type: inline::reference
image_type: venv
additional_pip_packages:
- aiosqlite
- asyncpg
- sqlalchemy[asyncio]

View file

@ -95,24 +95,28 @@ providers:
config:
kvstore:
namespace: vector_io::faiss
backend: kv_default
- provider_id: sqlite-vec
provider_type: inline::sqlite-vec
config:
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter-gpu}/sqlite_vec.db
kvstore:
namespace: vector_io::sqlite_vec
backend: kv_default
- provider_id: ${env.MILVUS_URL:+milvus}
provider_type: inline::milvus
config:
db_path: ${env.MILVUS_DB_PATH:=~/.llama/distributions/starter-gpu}/milvus.db
kvstore:
namespace: vector_io::milvus
backend: kv_default
- provider_id: ${env.CHROMADB_URL:+chromadb}
provider_type: remote::chromadb
config:
url: ${env.CHROMADB_URL:=}
kvstore:
namespace: vector_io::chroma_remote
backend: kv_default
- provider_id: ${env.PGVECTOR_DB:+pgvector}
provider_type: remote::pgvector
config:
@ -123,6 +127,7 @@ providers:
password: ${env.PGVECTOR_PASSWORD:=}
kvstore:
namespace: vector_io::pgvector
backend: kv_default
files:
- provider_id: meta-reference-files
provider_type: inline::localfs
@ -130,6 +135,7 @@ providers:
storage_dir: ${env.FILES_STORAGE_DIR:=~/.llama/distributions/starter-gpu/files}
metadata_store:
table_name: files_metadata
backend: sql_default
safety:
- provider_id: llama-guard
provider_type: inline::llama-guard
@ -144,8 +150,12 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
post_training:
- provider_id: huggingface-gpu
provider_type: inline::huggingface-gpu
@ -160,17 +170,20 @@ providers:
config:
kvstore:
namespace: eval
backend: kv_default
datasetio:
- provider_id: huggingface
provider_type: remote::huggingface
config:
kvstore:
namespace: datasetio::huggingface
backend: kv_default
- provider_id: localfs
provider_type: inline::localfs
config:
kvstore:
namespace: datasetio::localfs
backend: kv_default
scoring:
- provider_id: basic
provider_type: inline::basic
@ -201,25 +214,26 @@ providers:
config:
kvstore:
namespace: batches
backend: kv_default
storage:
backends:
default_kv_store:
kv_default:
type: kv_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter-gpu}/kvstore.db
default_sql_store:
sql_default:
type: sql_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter-gpu}/sql_store.db
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models: []
shields:
- shield_id: llama-guard

View file

@ -53,5 +53,6 @@ distribution_spec:
- provider_type: inline::reference
image_type: venv
additional_pip_packages:
- aiosqlite
- asyncpg
- sqlalchemy[asyncio]

View file

@ -95,24 +95,28 @@ providers:
config:
kvstore:
namespace: vector_io::faiss
backend: kv_default
- provider_id: sqlite-vec
provider_type: inline::sqlite-vec
config:
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/sqlite_vec.db
kvstore:
namespace: vector_io::sqlite_vec
backend: kv_default
- provider_id: ${env.MILVUS_URL:+milvus}
provider_type: inline::milvus
config:
db_path: ${env.MILVUS_DB_PATH:=~/.llama/distributions/starter}/milvus.db
kvstore:
namespace: vector_io::milvus
backend: kv_default
- provider_id: ${env.CHROMADB_URL:+chromadb}
provider_type: remote::chromadb
config:
url: ${env.CHROMADB_URL:=}
kvstore:
namespace: vector_io::chroma_remote
backend: kv_default
- provider_id: ${env.PGVECTOR_DB:+pgvector}
provider_type: remote::pgvector
config:
@ -123,6 +127,7 @@ providers:
password: ${env.PGVECTOR_PASSWORD:=}
kvstore:
namespace: vector_io::pgvector
backend: kv_default
files:
- provider_id: meta-reference-files
provider_type: inline::localfs
@ -130,6 +135,7 @@ providers:
storage_dir: ${env.FILES_STORAGE_DIR:=~/.llama/distributions/starter/files}
metadata_store:
table_name: files_metadata
backend: sql_default
safety:
- provider_id: llama-guard
provider_type: inline::llama-guard
@ -144,8 +150,12 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
post_training:
- provider_id: torchtune-cpu
provider_type: inline::torchtune-cpu
@ -157,17 +167,20 @@ providers:
config:
kvstore:
namespace: eval
backend: kv_default
datasetio:
- provider_id: huggingface
provider_type: remote::huggingface
config:
kvstore:
namespace: datasetio::huggingface
backend: kv_default
- provider_id: localfs
provider_type: inline::localfs
config:
kvstore:
namespace: datasetio::localfs
backend: kv_default
scoring:
- provider_id: basic
provider_type: inline::basic
@ -198,25 +211,26 @@ providers:
config:
kvstore:
namespace: batches
backend: kv_default
storage:
backends:
default_kv_store:
kv_default:
type: kv_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/kvstore.db
default_sql_store:
sql_default:
type: sql_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/sql_store.db
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models: []
shields:
- shield_id: llama-guard

View file

@ -231,31 +231,29 @@ class RunConfigSettings(BaseModel):
apis = sorted(providers.keys())
storage_backends = self.storage_backends or {
"default_kv_store": SqliteKVStoreConfig.sample_run_config(
"kv_default": SqliteKVStoreConfig.sample_run_config(
__distro_dir__=f"~/.llama/distributions/{name}",
db_name="kvstore.db",
),
"default_sql_store": SqliteSqlStoreConfig.sample_run_config(
"sql_default": SqliteSqlStoreConfig.sample_run_config(
__distro_dir__=f"~/.llama/distributions/{name}",
db_name="sql_store.db",
),
}
storage_config = dict(
backends=storage_backends,
metadata=KVStoreReference(
backend="default_kv_store",
namespace="registry",
).model_dump(exclude_none=True),
inference=InferenceStoreReference(
backend="default_sql_store",
table_name="inference_store",
).model_dump(exclude_none=True),
conversations=SqlStoreReference(
backend="default_sql_store",
table_name="openai_conversations",
).model_dump(exclude_none=True),
)
storage_config = dict(backends=storage_backends)
metadata_store = KVStoreReference(
backend="kv_default",
namespace="registry",
).model_dump(exclude_none=True)
inference_store = InferenceStoreReference(
backend="sql_default",
table_name="inference_store",
).model_dump(exclude_none=True)
conversations_store = SqlStoreReference(
backend="sql_default",
table_name="openai_conversations",
).model_dump(exclude_none=True)
# Return a dict that matches StackRunConfig structure
return {
@ -265,6 +263,9 @@ class RunConfigSettings(BaseModel):
"apis": apis,
"providers": provider_configs,
"storage": storage_config,
"metadata_store": metadata_store,
"inference_store": inference_store,
"conversations_store": conversations_store,
"models": [m.model_dump(exclude_none=True) for m in (self.default_models or [])],
"shields": [s.model_dump(exclude_none=True) for s in (self.default_shields or [])],
"vector_dbs": [],
@ -314,11 +315,15 @@ class DistributionTemplate(BaseModel):
# We should have a better way to do this by formalizing the concept of "internal" APIs
# and providers, with a way to specify dependencies for them.
if run_config_.get("inference_store"):
additional_pip_packages.extend(get_sql_pip_packages(run_config_["inference_store"]))
if run_config_.get("metadata_store"):
additional_pip_packages.extend(get_kv_pip_packages(run_config_["metadata_store"]))
storage_cfg = run_config_.get("storage", {})
for backend_cfg in storage_cfg.get("backends", {}).values():
store_type = backend_cfg.get("type")
if not store_type:
continue
if str(store_type).startswith("kv_"):
additional_pip_packages.extend(get_kv_pip_packages(backend_cfg))
elif str(store_type).startswith("sql_"):
additional_pip_packages.extend(get_sql_pip_packages(backend_cfg))
if self.additional_pip_packages:
additional_pip_packages.extend(self.additional_pip_packages)

View file

@ -28,4 +28,6 @@ distribution_spec:
files:
- provider_type: inline::localfs
image_type: venv
additional_pip_packages: []
additional_pip_packages:
- aiosqlite
- sqlalchemy[asyncio]

View file

@ -24,6 +24,7 @@ providers:
config:
kvstore:
namespace: vector_io::faiss
backend: kv_default
safety:
- provider_id: llama-guard
provider_type: inline::llama-guard
@ -36,25 +37,32 @@ providers:
persistence:
agent_state:
namespace: agents
backend: kv_default
responses:
table_name: responses
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
eval:
- provider_id: meta-reference
provider_type: inline::meta-reference
config:
kvstore:
namespace: eval
backend: kv_default
datasetio:
- provider_id: huggingface
provider_type: remote::huggingface
config:
kvstore:
namespace: datasetio::huggingface
backend: kv_default
- provider_id: localfs
provider_type: inline::localfs
config:
kvstore:
namespace: datasetio::localfs
backend: kv_default
scoring:
- provider_id: basic
provider_type: inline::basic
@ -86,25 +94,26 @@ providers:
storage_dir: ${env.FILES_STORAGE_DIR:=~/.llama/distributions/watsonx/files}
metadata_store:
table_name: files_metadata
backend: sql_default
storage:
backends:
default_kv_store:
kv_default:
type: kv_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/kvstore.db
default_sql_store:
sql_default:
type: sql_sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/sql_store.db
metadata:
namespace: registry
backend: default_kv_store
inference:
table_name: inference_store
backend: default_sql_store
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: default_sql_store
metadata_store:
namespace: registry
backend: kv_default
inference_store:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations_store:
table_name: openai_conversations
backend: sql_default
models: []
shields: []
vector_dbs: []