Skip to content

Commit 536d6a0

Browse files
author
Radovan Fuchs
committed
library mode configs for e2e
1 parent 98ee937 commit 536d6a0

File tree

2 files changed

+176
-28
lines changed

2 files changed

+176
-28
lines changed

.github/workflows/e2e_tests.yaml

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -93,51 +93,44 @@ jobs:
9393
9494
- name: Select and configure run.yaml
9595
env:
96-
CONFIG_ENVIRONMENT: ${{ matrix.environment }}
96+
CONFIG_MODE: ${{ matrix.mode }}
9797
run: |
9898
CONFIGS_DIR="tests/e2e/configs"
99-
ENVIRONMENT="$CONFIG_ENVIRONMENT"
99+
MODE="$CONFIG_MODE"
100100
101-
echo "Looking for configurations in $CONFIGS_DIR/"
101+
echo "Deployment mode: $MODE"
102102
103-
# List available configurations
104-
if [ -d "$CONFIGS_DIR" ]; then
105-
echo "Available configurations:"
106-
ls -la "$CONFIGS_DIR"/*.yaml 2>/dev/null || echo "No YAML files found in $CONFIGS_DIR/"
103+
# Select config based on mode:
104+
# - library mode: run-library.yaml (llama-stack 0.3.0 format)
105+
# - server mode: run-ci.yaml (original format)
106+
if [ "$MODE" == "library" ]; then
107+
CONFIG_FILE="$CONFIGS_DIR/run-library.yaml"
107108
else
108-
echo "Configs directory '$CONFIGS_DIR' not found!"
109-
exit 1
109+
CONFIG_FILE="$CONFIGS_DIR/run-ci.yaml"
110110
fi
111111
112-
# Determine which config file to use
113-
CONFIG_FILE="$CONFIGS_DIR/run-$ENVIRONMENT.yaml"
114-
115-
echo "Looking for: $CONFIG_FILE"
112+
echo "Using configuration: $CONFIG_FILE"
116113
117-
if [ -f "$CONFIG_FILE" ]; then
118-
echo "Found config for $ENVIRONMENT environment"
119-
cp "$CONFIG_FILE" run.yaml
120-
else
121-
echo "Configuration file not found: $CONFIG_FILE"
122-
echo "Available files:"
123-
find "$CONFIGS_DIR" -name "*.yaml"
114+
if [ ! -f "$CONFIG_FILE" ]; then
115+
echo "❌ Configuration not found: $CONFIG_FILE"
116+
echo "Available configs:"
117+
ls -la "$CONFIGS_DIR"/*.yaml
124118
exit 1
125119
fi
126120
127-
# Update paths for container environment (relative -> absolute)
128-
sed -i 's|db_path: \.llama/distributions|db_path: /app-root/.llama/distributions|g' run.yaml
129-
sed -i 's|db_path: tmp/|db_path: /app-root/.llama/distributions/|g' run.yaml
130-
131-
echo "Successfully configured for $ENVIRONMENT environment"
132-
echo "Using configuration: $(basename "$CONFIG_FILE")"
121+
cp "$CONFIG_FILE" run.yaml
122+
echo "✅ Configuration copied to run.yaml"
133123
134124
- name: Show final configuration
135125
run: |
136126
echo "=== Configuration Summary ==="
137127
echo "Deployment mode: ${{ matrix.mode }}"
138128
echo "Environment: ${{ matrix.environment }}"
139-
echo "Source config: tests/e2e/configs/run-${{ matrix.environment }}.yaml"
140-
echo "Final file: run.yaml"
129+
if [ "${{ matrix.mode }}" == "library" ]; then
130+
echo "Source config: tests/e2e/configs/run-library.yaml"
131+
else
132+
echo "Source config: tests/e2e/configs/run-ci.yaml"
133+
fi
141134
echo ""
142135
echo "=== Configuration Preview ==="
143136
echo "Providers: $(grep -c "provider_id:" run.yaml)"

tests/e2e/configs/run-library.yaml

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
version: 2
2+
3+
apis:
4+
- agents
5+
- batches
6+
- datasetio
7+
- eval
8+
- files
9+
- inference
10+
- safety
11+
- scoring
12+
- tool_runtime
13+
- vector_io
14+
15+
benchmarks: []
16+
conversations_store:
17+
db_path: /tmp/conversations.db
18+
type: sqlite
19+
datasets: []
20+
image_name: starter
21+
# external_providers_dir: /opt/app-root/src/.llama/providers.d
22+
inference_store:
23+
db_path: /tmp/inference_store.db
24+
type: sqlite
25+
metadata_store:
26+
db_path: /tmp/registry.db
27+
type: sqlite
28+
29+
models:
30+
- model_id: sentence-transformers/all-mpnet-base-v2
31+
model_type: embedding
32+
provider_id: sentence-transformers
33+
provider_model_id: sentence-transformers/all-mpnet-base-v2
34+
metadata:
35+
embedding_dimension: 768
36+
# - model_id: gpt-4o-mini
37+
# provider_id: openai
38+
# model_type: llm
39+
# provider_model_id: gpt-4o-mini
40+
41+
providers:
42+
agents:
43+
- config:
44+
persistence:
45+
agent_state:
46+
namespace: agents_state
47+
backend: kv_default
48+
responses:
49+
table_name: agents_responses
50+
backend: sql_default
51+
provider_id: meta-reference
52+
provider_type: inline::meta-reference
53+
batches:
54+
- config:
55+
kvstore:
56+
namespace: batches_store
57+
backend: kv_default
58+
provider_id: reference
59+
provider_type: inline::reference
60+
datasetio:
61+
- config:
62+
kvstore:
63+
namespace: huggingface_datasetio
64+
backend: kv_default
65+
provider_id: huggingface
66+
provider_type: remote::huggingface
67+
- config:
68+
kvstore:
69+
namespace: localfs_datasetio
70+
backend: kv_default
71+
provider_id: localfs
72+
provider_type: inline::localfs
73+
eval:
74+
- config:
75+
kvstore:
76+
namespace: eval_store
77+
backend: kv_default
78+
provider_id: meta-reference
79+
provider_type: inline::meta-reference
80+
files:
81+
- config:
82+
metadata_store:
83+
table_name: files_metadata
84+
backend: sql_default
85+
storage_dir: /tmp/files
86+
provider_id: meta-reference-files
87+
provider_type: inline::localfs
88+
inference:
89+
- provider_id: openai
90+
provider_type: remote::openai
91+
config:
92+
api_key: ${env.OPENAI_API_KEY}
93+
- config: {}
94+
provider_id: sentence-transformers
95+
provider_type: inline::sentence-transformers
96+
safety:
97+
- config:
98+
excluded_categories: []
99+
provider_id: llama-guard
100+
provider_type: inline::llama-guard
101+
scoring:
102+
- config: {}
103+
provider_id: basic
104+
provider_type: inline::basic
105+
- config: {}
106+
provider_id: llm-as-judge
107+
provider_type: inline::llm-as-judge
108+
# telemetry:
109+
# - config:
110+
# service_name: "​"
111+
# provider_id: meta-reference
112+
# provider_type: inline::meta-reference
113+
tool_runtime:
114+
- config: {}
115+
provider_id: rag-runtime
116+
provider_type: inline::rag-runtime
117+
vector_io:
118+
- config:
119+
persistence:
120+
namespace: faiss_store
121+
backend: kv_default
122+
provider_id: faiss
123+
provider_type: inline::faiss
124+
scoring_fns: []
125+
server:
126+
port: 8321
127+
shields: []
128+
tool_groups:
129+
- provider_id: rag-runtime
130+
toolgroup_id: builtin::rag
131+
vector_dbs: []
132+
storage:
133+
backends:
134+
kv_default:
135+
type: kv_sqlite
136+
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/kv_store.db
137+
sql_default:
138+
type: sql_sqlite
139+
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/sql_store.db
140+
stores:
141+
metadata:
142+
namespace: registry
143+
backend: kv_default
144+
inference:
145+
table_name: inference_store
146+
backend: sql_default
147+
max_write_queue_size: 10000
148+
num_writers: 4
149+
conversations:
150+
table_name: openai_conversations
151+
backend: sql_default
152+
prompts:
153+
namespace: prompts
154+
backend: kv_default
155+

0 commit comments

Comments
 (0)