From fa864f70da18615bc765296d3f13184748f54585 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Tue, 17 Sep 2024 12:09:18 -0700 Subject: [PATCH] small naming shenanigans --- MANIFEST.in | 2 ++ docs/cli_reference.md | 12 ++++++------ docs/getting_started.md | 14 +++++++------- llama_stack/cli/stack/build.py | 4 ++-- .../configs}/conda/local-conda-example-build.yaml | 0 .../conda/local-fireworks-conda-example-build.yaml | 0 .../conda/local-ollama-conda-example-build.yaml | 0 .../conda/local-tgi-conda-example-build.yaml | 0 .../conda/local-together-conda-example-build.yaml | 0 .../docker/local-docker-example-build.yaml | 0 10 files changed, 17 insertions(+), 15 deletions(-) rename llama_stack/{configs/distributions => distribution/configs}/conda/local-conda-example-build.yaml (100%) rename llama_stack/{configs/distributions => distribution/configs}/conda/local-fireworks-conda-example-build.yaml (100%) rename llama_stack/{configs/distributions => distribution/configs}/conda/local-ollama-conda-example-build.yaml (100%) rename llama_stack/{configs/distributions => distribution/configs}/conda/local-tgi-conda-example-build.yaml (100%) rename llama_stack/{configs/distributions => distribution/configs}/conda/local-together-conda-example-build.yaml (100%) rename llama_stack/{configs/distributions => distribution/configs}/docker/local-docker-example-build.yaml (100%) diff --git a/MANIFEST.in b/MANIFEST.in index bacea3148..139841664 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,3 +2,5 @@ include requirements.txt include llama_stack/data/*.yaml include llama_stack/core/*.sh include llama_stack/cli/scripts/*.sh +include llama_stack/distribution/configs/conda/*.yaml +include llama_stack/distribution/configs/docker/*.yaml diff --git a/docs/cli_reference.md b/docs/cli_reference.md index 5f33fda78..0f89884f8 100644 --- a/docs/cli_reference.md +++ b/docs/cli_reference.md @@ -276,11 +276,11 @@ The following command and specifications allows you to get started with building ``` llama stack build ``` -- You will be required to pass in a file path to the build.config file (e.g. `./llama_stack/configs/distributions/conda/local-conda-example-build.yaml`). We provide some example build config files for configuring different types of distributions in the `./llama_stack/configs/distributions/` folder. +- You will be required to pass in a file path to the build.config file (e.g. `./llama_stack/distribution/configs/conda/local-conda-example-build.yaml`). We provide some example build config files for configuring different types of distributions in the `./llama_stack/distribution/configs/` folder. The file will be of the contents ``` -$ cat ./llama_stack/configs/distributions/conda/local-conda-example-build.yaml +$ cat ./llama_stack/distribution/configs/conda/local-conda-example-build.yaml name: 8b-instruct distribution_spec: @@ -311,7 +311,7 @@ After this step is complete, a file named `8b-instruct-build.yaml` will be gener To specify a different API provider, we can change the `distribution_spec` in our `-build.yaml` config. For example, the following build spec allows you to build a distribution using TGI as the inference API provider. ``` -$ cat ./llama_stack/configs/distributions/conda/local-tgi-conda-example-build.yaml +$ cat ./llama_stack/distribution/configs/conda/local-tgi-conda-example-build.yaml name: local-tgi-conda-example distribution_spec: @@ -328,7 +328,7 @@ image_type: conda The following command allows you to build a distribution with TGI as the inference API provider, with the name `tgi`. ``` -llama stack build --config ./llama_stack/configs/distributions/conda/local-tgi-conda-example-build.yaml --name tgi +llama stack build --config ./llama_stack/distribution/configs/conda/local-tgi-conda-example-build.yaml --name tgi ``` We provide some example build configs to help you get started with building with different API providers. @@ -337,7 +337,7 @@ We provide some example build configs to help you get started with building with To build a docker image, simply change the `image_type` to `docker` in our `-build.yaml` file, and run `llama stack build --config -build.yaml`. ``` -$ cat ./llama_stack/configs/distributions/docker/local-docker-example-build.yaml +$ cat ./llama_stack/distribution/configs/docker/local-docker-example-build.yaml name: local-docker-example distribution_spec: @@ -354,7 +354,7 @@ image_type: docker The following command allows you to build a Docker image with the name `docker-local` ``` -llama stack build --config ./llama_stack/configs/distributions/docker/local-docker-example-build.yaml --name docker-local +llama stack build --config ./llama_stack/distribution/configs/docker/local-docker-example-build.yaml --name docker-local Dockerfile created successfully in /tmp/tmp.I0ifS2c46A/DockerfileFROM python:3.10-slim WORKDIR /app diff --git a/docs/getting_started.md b/docs/getting_started.md index 8bc7ac721..45d192a08 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -9,7 +9,7 @@ This guides allows you to quickly get started with building and running a Llama **`llama stack build`** ``` -llama stack build --config ./llama_stack/configs/distributions/conda/local-conda-example-build.yaml --name my-local-llama-stack +llama stack build --config ./llama_stack/distribution/configs/conda/local-conda-example-build.yaml --name my-local-llama-stack ... ... Build spec configuration saved at ~/.llama/distributions/conda/my-local-llama-stack-build.yaml @@ -97,11 +97,11 @@ The following command and specifications allows you to get started with building ``` llama stack build ``` -- You will be required to pass in a file path to the build.config file (e.g. `./llama_stack/configs/distributions/conda/local-conda-example-build.yaml`). We provide some example build config files for configuring different types of distributions in the `./llama_stack/configs/distributions/` folder. +- You will be required to pass in a file path to the build.config file (e.g. `./llama_stack/distribution/configs/conda/local-conda-example-build.yaml`). We provide some example build config files for configuring different types of distributions in the `./llama_stack/distribution/configs/` folder. The file will be of the contents ``` -$ cat ./llama_stack/configs/distributions/conda/local-conda-example-build.yaml +$ cat ./llama_stack/distribution/configs/conda/local-conda-example-build.yaml name: 8b-instruct distribution_spec: @@ -132,7 +132,7 @@ After this step is complete, a file named `8b-instruct-build.yaml` will be gener To specify a different API provider, we can change the `distribution_spec` in our `-build.yaml` config. For example, the following build spec allows you to build a distribution using TGI as the inference API provider. ``` -$ cat ./llama_stack/configs/distributions/conda/local-tgi-conda-example-build.yaml +$ cat ./llama_stack/distribution/configs/conda/local-tgi-conda-example-build.yaml name: local-tgi-conda-example distribution_spec: @@ -149,7 +149,7 @@ image_type: conda The following command allows you to build a distribution with TGI as the inference API provider, with the name `tgi`. ``` -llama stack build --config ./llama_stack/configs/distributions/conda/local-tgi-conda-example-build.yaml --name tgi +llama stack build --config ./llama_stack/distribution/configs/conda/local-tgi-conda-example-build.yaml --name tgi ``` We provide some example build configs to help you get started with building with different API providers. @@ -158,7 +158,7 @@ We provide some example build configs to help you get started with building with To build a docker image, simply change the `image_type` to `docker` in our `-build.yaml` file, and run `llama stack build --config -build.yaml`. ``` -$ cat ./llama_stack/configs/distributions/docker/local-docker-example-build.yaml +$ cat ./llama_stack/distribution/configs/docker/local-docker-example-build.yaml name: local-docker-example distribution_spec: @@ -175,7 +175,7 @@ image_type: docker The following command allows you to build a Docker image with the name `docker-local` ``` -llama stack build --config ./llama_stack/configs/distributions/docker/local-docker-example-build.yaml --name docker-local +llama stack build --config ./llama_stack/distribution/configs/docker/local-docker-example-build.yaml --name docker-local Dockerfile created successfully in /tmp/tmp.I0ifS2c46A/DockerfileFROM python:3.10-slim WORKDIR /app diff --git a/llama_stack/cli/stack/build.py b/llama_stack/cli/stack/build.py index c2df591c8..39b238f48 100644 --- a/llama_stack/cli/stack/build.py +++ b/llama_stack/cli/stack/build.py @@ -29,7 +29,7 @@ class StackBuild(Subcommand): self.parser.add_argument( "config", type=str, - help="Path to a config file to use for the build. You may find example configs in llama_stack/configs/distributions", + help="Path to a config file to use for the build. You may find example configs in llama_stack/distribution/configs", ) self.parser.add_argument( @@ -79,7 +79,7 @@ class StackBuild(Subcommand): if not args.config: self.parser.error( - "No config file specified. Please use `llama stack build /path/to/*-build.yaml`. Example config files can be found in llama_stack/configs/distributions" + "No config file specified. Please use `llama stack build /path/to/*-build.yaml`. Example config files can be found in llama_stack/distribution/configs" ) return diff --git a/llama_stack/configs/distributions/conda/local-conda-example-build.yaml b/llama_stack/distribution/configs/conda/local-conda-example-build.yaml similarity index 100% rename from llama_stack/configs/distributions/conda/local-conda-example-build.yaml rename to llama_stack/distribution/configs/conda/local-conda-example-build.yaml diff --git a/llama_stack/configs/distributions/conda/local-fireworks-conda-example-build.yaml b/llama_stack/distribution/configs/conda/local-fireworks-conda-example-build.yaml similarity index 100% rename from llama_stack/configs/distributions/conda/local-fireworks-conda-example-build.yaml rename to llama_stack/distribution/configs/conda/local-fireworks-conda-example-build.yaml diff --git a/llama_stack/configs/distributions/conda/local-ollama-conda-example-build.yaml b/llama_stack/distribution/configs/conda/local-ollama-conda-example-build.yaml similarity index 100% rename from llama_stack/configs/distributions/conda/local-ollama-conda-example-build.yaml rename to llama_stack/distribution/configs/conda/local-ollama-conda-example-build.yaml diff --git a/llama_stack/configs/distributions/conda/local-tgi-conda-example-build.yaml b/llama_stack/distribution/configs/conda/local-tgi-conda-example-build.yaml similarity index 100% rename from llama_stack/configs/distributions/conda/local-tgi-conda-example-build.yaml rename to llama_stack/distribution/configs/conda/local-tgi-conda-example-build.yaml diff --git a/llama_stack/configs/distributions/conda/local-together-conda-example-build.yaml b/llama_stack/distribution/configs/conda/local-together-conda-example-build.yaml similarity index 100% rename from llama_stack/configs/distributions/conda/local-together-conda-example-build.yaml rename to llama_stack/distribution/configs/conda/local-together-conda-example-build.yaml diff --git a/llama_stack/configs/distributions/docker/local-docker-example-build.yaml b/llama_stack/distribution/configs/docker/local-docker-example-build.yaml similarity index 100% rename from llama_stack/configs/distributions/docker/local-docker-example-build.yaml rename to llama_stack/distribution/configs/docker/local-docker-example-build.yaml