Skip to content

Commit 2665f00

Browse files
authored
chore(rename): move llama_stack.distribution to llama_stack.core (ogx-ai#2975)
We would like to rename the term `template` to `distribution`. To prepare for that, this is a precursor. cc @leseb
1 parent f3d5459 commit 2665f00

211 files changed

Lines changed: 351 additions & 348 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/providers-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99
paths:
1010
- 'llama_stack/cli/stack/build.py'
1111
- 'llama_stack/cli/stack/_build.py'
12-
- 'llama_stack/distribution/build.*'
13-
- 'llama_stack/distribution/*.sh'
12+
- 'llama_stack/core/build.*'
13+
- 'llama_stack/core/*.sh'
1414
- '.github/workflows/providers-build.yml'
1515
- 'llama_stack/templates/**'
1616
- 'pyproject.toml'
@@ -19,8 +19,8 @@ on:
1919
paths:
2020
- 'llama_stack/cli/stack/build.py'
2121
- 'llama_stack/cli/stack/_build.py'
22-
- 'llama_stack/distribution/build.*'
23-
- 'llama_stack/distribution/*.sh'
22+
- 'llama_stack/core/build.*'
23+
- 'llama_stack/core/*.sh'
2424
- '.github/workflows/providers-build.yml'
2525
- 'llama_stack/templates/**'
2626
- 'pyproject.toml'
@@ -108,7 +108,7 @@ jobs:
108108
IMAGE_ID=$(docker images --format "{{.Repository}}:{{.Tag}}" | head -n 1)
109109
entrypoint=$(docker inspect --format '{{ .Config.Entrypoint }}' $IMAGE_ID)
110110
echo "Entrypoint: $entrypoint"
111-
if [ "$entrypoint" != "[python -m llama_stack.distribution.server.server --config /app/run.yaml]" ]; then
111+
if [ "$entrypoint" != "[python -m llama_stack.core.server.server --config /app/run.yaml]" ]; then
112112
echo "Entrypoint is not correct"
113113
exit 1
114114
fi
@@ -142,7 +142,7 @@ jobs:
142142
IMAGE_ID=$(docker images --format "{{.Repository}}:{{.Tag}}" | head -n 1)
143143
entrypoint=$(docker inspect --format '{{ .Config.Entrypoint }}' $IMAGE_ID)
144144
echo "Entrypoint: $entrypoint"
145-
if [ "$entrypoint" != "[python -m llama_stack.distribution.server.server --config /app/run.yaml]" ]; then
145+
if [ "$entrypoint" != "[python -m llama_stack.core.server.server --config /app/run.yaml]" ]; then
146146
echo "Entrypoint is not correct"
147147
exit 1
148148
fi

.github/workflows/test-external-provider-module.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ on:
1616
- 'tests/external/*'
1717
- '.github/workflows/test-external-provider-module.yml' # This workflow
1818

19+
# This workflow is disabled. See https://github.com/meta-llama/llama-stack/pull/2975#issuecomment-3138702984 for details
20+
if: false
21+
1922
jobs:
2023
test-external-providers-from-module:
2124
runs-on: ubuntu-latest
@@ -47,7 +50,7 @@ jobs:
4750
4851
- name: Build distro from config file
4952
run: |
50-
USE_COPY_NOT_MOUNT=true LLAMA_STACK_DIR=. llama stack build --config tests/external/ramalama-stack/build.yaml
53+
USE_COPY_NOT_MOUNT=true LLAMA_STACK_DIR=. uv run llama stack build --config tests/external/ramalama-stack/build.yaml
5154
5255
- name: Start Llama Stack server in background
5356
if: ${{ matrix.image-type }} == 'venv'

.github/workflows/test-external.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ jobs:
4343
4444
- name: Print distro dependencies
4545
run: |
46-
USE_COPY_NOT_MOUNT=true LLAMA_STACK_DIR=. llama stack build --config tests/external/build.yaml --print-deps-only
46+
USE_COPY_NOT_MOUNT=true LLAMA_STACK_DIR=. uv run llama stack build --config tests/external/build.yaml --print-deps-only
4747
4848
- name: Build distro from config file
4949
run: |
50-
USE_COPY_NOT_MOUNT=true LLAMA_STACK_DIR=. llama stack build --config tests/external/build.yaml
50+
USE_COPY_NOT_MOUNT=true LLAMA_STACK_DIR=. uv run llama stack build --config tests/external/build.yaml
5151
5252
- name: Start Llama Stack server in background
5353
if: ${{ matrix.image-type }} == 'venv'

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include pyproject.toml
22
include llama_stack/models/llama/llama3/tokenizer.model
33
include llama_stack/models/llama/llama4/tokenizer.model
4-
include llama_stack/distribution/*.sh
4+
include llama_stack.core/*.sh
55
include llama_stack/cli/scripts/*.sh
66
include llama_stack/templates/*/*.yaml
77
include llama_stack/providers/tests/test_cases/inference/*.json

docs/getting_started.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
"# use this helper if needed to kill the server \n",
166166
"def kill_llama_stack_server():\n",
167167
" # Kill any existing llama stack server processes\n",
168-
" os.system(\"ps aux | grep -v grep | grep llama_stack.distribution.server.server | awk '{print $2}' | xargs kill -9\")\n"
168+
" os.system(\"ps aux | grep -v grep | grep llama_stack.core.server.server | awk '{print $2}' | xargs kill -9\")\n"
169169
]
170170
},
171171
{

docs/getting_started_llama4.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
"# use this helper if needed to kill the server \n",
276276
"def kill_llama_stack_server():\n",
277277
" # Kill any existing llama stack server processes\n",
278-
" os.system(\"ps aux | grep -v grep | grep llama_stack.distribution.server.server | awk '{print $2}' | xargs kill -9\")\n"
278+
" os.system(\"ps aux | grep -v grep | grep llama_stack.core.server.server | awk '{print $2}' | xargs kill -9\")\n"
279279
]
280280
},
281281
{

docs/getting_started_llama_api.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265
"# use this helper if needed to kill the server \n",
266266
"def kill_llama_stack_server():\n",
267267
" # Kill any existing llama stack server processes\n",
268-
" os.system(\"ps aux | grep -v grep | grep llama_stack.distribution.server.server | awk '{print $2}' | xargs kill -9\")\n"
268+
" os.system(\"ps aux | grep -v grep | grep llama_stack.core.server.server | awk '{print $2}' | xargs kill -9\")\n"
269269
]
270270
},
271271
{

docs/notebooks/Alpha_Llama_Stack_Post_Training.ipynb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3216,19 +3216,19 @@
32163216
"INFO:datasets:Duckdb version 1.1.3 available.\n",
32173217
"INFO:datasets:TensorFlow version 2.18.0 available.\n",
32183218
"INFO:datasets:JAX version 0.4.33 available.\n",
3219-
"INFO:llama_stack.distribution.stack:Scoring_fns: basic::equality served by basic\n",
3220-
"INFO:llama_stack.distribution.stack:Scoring_fns: basic::subset_of served by basic\n",
3221-
"INFO:llama_stack.distribution.stack:Scoring_fns: basic::regex_parser_multiple_choice_answer served by basic\n",
3222-
"INFO:llama_stack.distribution.stack:Scoring_fns: braintrust::factuality served by braintrust\n",
3223-
"INFO:llama_stack.distribution.stack:Scoring_fns: braintrust::answer-correctness served by braintrust\n",
3224-
"INFO:llama_stack.distribution.stack:Scoring_fns: braintrust::answer-relevancy served by braintrust\n",
3225-
"INFO:llama_stack.distribution.stack:Scoring_fns: braintrust::answer-similarity served by braintrust\n",
3226-
"INFO:llama_stack.distribution.stack:Scoring_fns: braintrust::faithfulness served by braintrust\n",
3227-
"INFO:llama_stack.distribution.stack:Scoring_fns: braintrust::context-entity-recall served by braintrust\n",
3228-
"INFO:llama_stack.distribution.stack:Scoring_fns: braintrust::context-precision served by braintrust\n",
3229-
"INFO:llama_stack.distribution.stack:Scoring_fns: braintrust::context-recall served by braintrust\n",
3230-
"INFO:llama_stack.distribution.stack:Scoring_fns: braintrust::context-relevancy served by braintrust\n",
3231-
"INFO:llama_stack.distribution.stack:\n"
3219+
"INFO:llama_stack.core.stack:Scoring_fns: basic::equality served by basic\n",
3220+
"INFO:llama_stack.core.stack:Scoring_fns: basic::subset_of served by basic\n",
3221+
"INFO:llama_stack.core.stack:Scoring_fns: basic::regex_parser_multiple_choice_answer served by basic\n",
3222+
"INFO:llama_stack.core.stack:Scoring_fns: braintrust::factuality served by braintrust\n",
3223+
"INFO:llama_stack.core.stack:Scoring_fns: braintrust::answer-correctness served by braintrust\n",
3224+
"INFO:llama_stack.core.stack:Scoring_fns: braintrust::answer-relevancy served by braintrust\n",
3225+
"INFO:llama_stack.core.stack:Scoring_fns: braintrust::answer-similarity served by braintrust\n",
3226+
"INFO:llama_stack.core.stack:Scoring_fns: braintrust::faithfulness served by braintrust\n",
3227+
"INFO:llama_stack.core.stack:Scoring_fns: braintrust::context-entity-recall served by braintrust\n",
3228+
"INFO:llama_stack.core.stack:Scoring_fns: braintrust::context-precision served by braintrust\n",
3229+
"INFO:llama_stack.core.stack:Scoring_fns: braintrust::context-recall served by braintrust\n",
3230+
"INFO:llama_stack.core.stack:Scoring_fns: braintrust::context-relevancy served by braintrust\n",
3231+
"INFO:llama_stack.core.stack:\n"
32323232
]
32333233
},
32343234
{
@@ -3448,7 +3448,7 @@
34483448
"\n",
34493449
"os.environ['OPENAI_API_KEY'] = userdata.get('OPENAI_API_KEY')\n",
34503450
"\n",
3451-
"from llama_stack.distribution.library_client import LlamaStackAsLibraryClient\n",
3451+
"from llama_stack.core.library_client import LlamaStackAsLibraryClient\n",
34523452
"client = LlamaStackAsLibraryClient(\"experimental-post-training\")\n",
34533453
"_ = client.initialize()"
34543454
]

docs/notebooks/Llama_Stack_Agent_Workflows.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"outputs": [],
4949
"source": [
5050
"from llama_stack_client import LlamaStackClient, Agent\n",
51-
"from llama_stack.distribution.library_client import LlamaStackAsLibraryClient\n",
51+
"from llama_stack.core.library_client import LlamaStackAsLibraryClient\n",
5252
"from rich.pretty import pprint\n",
5353
"import json\n",
5454
"import uuid\n",

docs/notebooks/Llama_Stack_Benchmark_Evals.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@
661661
"except ImportError:\n",
662662
" print(\"Not in Google Colab environment\")\n",
663663
"\n",
664-
"from llama_stack.distribution.library_client import LlamaStackAsLibraryClient\n",
664+
"from llama_stack.core.library_client import LlamaStackAsLibraryClient\n",
665665
"\n",
666666
"client = LlamaStackAsLibraryClient(\"together\")\n",
667667
"_ = client.initialize()"

0 commit comments

Comments
 (0)