From 89d37687dd375eeee96bfd04e960bd328cc00f73 Mon Sep 17 00:00:00 2001 From: Reid <61492567+reidliu41@users.noreply.github.com> Date: Wed, 19 Feb 2025 02:13:46 +0800 Subject: [PATCH] chore: remove --no-list-templates option (#1121) # What does this PR do? [Provide a short summary of what this PR does and why. Link to relevant issues if applicable.] From the code and the usage, seems cannot see that need to use `--no-list-templates` to handle, and also make the user confused from the help text, so try to remove it. ``` $ llama stack build --no-list-templates > Enter a name for your Llama Stack (e.g. my-local-stack): $ llama stack build > Enter a name for your Llama Stack (e.g. my-local-stack): before: $ llama stack build --help --list-templates, --no-list-templates Show the available templates for building a Llama Stack distribution (default: False) after: --list-templates Show the available templates for building a Llama Stack distribution ``` [//]: # (If resolving an issue, uncomment and update the line below) [//]: # (Closes #[issue-number]) ## Test Plan [Describe the tests you ran to verify your changes with result summaries. *Provide clear instructions so the plan can be easily re-executed.*] [//]: # (## Documentation) Signed-off-by: reidliu Co-authored-by: reidliu --- docs/source/distributions/building_distro.md | 7 ++++--- llama_stack/cli/stack/build.py | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/distributions/building_distro.md b/docs/source/distributions/building_distro.md index 90239cb4e..9cb1a402f 100644 --- a/docs/source/distributions/building_distro.md +++ b/docs/source/distributions/building_distro.md @@ -23,7 +23,8 @@ The main points to consider are: ``` llama stack build -h -usage: llama stack build [-h] [--config CONFIG] [--template TEMPLATE] [--list-templates | --no-list-templates] [--image-type {conda,container,venv}] [--image-name IMAGE_NAME] +usage: llama stack build [-h] [--config CONFIG] [--template TEMPLATE] [--list-templates] + [--image-type {conda,container,venv}] [--image-name IMAGE_NAME] [--print-deps-only] Build a Llama stack container @@ -32,14 +33,14 @@ options: --config CONFIG Path to a config file to use for the build. You can find example configs in llama_stack/distribution/**/build.yaml. If this argument is not provided, you will be prompted to enter information interactively --template TEMPLATE Name of the example template config to use for build. You may use `llama stack build --list-templates` to check out the available templates - --list-templates, --no-list-templates - Show the available templates for building a Llama Stack distribution (default: False) + --list-templates Show the available templates for building a Llama Stack distribution --image-type {conda,container,venv} Image Type to use for the build. This can be either conda or container or venv. If not specified, will use the image type from the template config. --image-name IMAGE_NAME [for image-type=conda] Name of the conda environment to use for the build. If not specified, currently active Conda environment will be used. If no Conda environment is active, you must specify a name. + --print-deps-only Print the dependencies for the stack only, without building the stack ``` After this step is complete, a file named `-build.yaml` and template file `-run.yaml` will be generated and saved at the output file path specified at the end of the command. diff --git a/llama_stack/cli/stack/build.py b/llama_stack/cli/stack/build.py index ca4c0d8ce..7b17a960a 100644 --- a/llama_stack/cli/stack/build.py +++ b/llama_stack/cli/stack/build.py @@ -38,9 +38,8 @@ class StackBuild(Subcommand): self.parser.add_argument( "--list-templates", - type=bool, + action="store_true", default=False, - action=argparse.BooleanOptionalAction, help="Show the available templates for building a Llama Stack distribution", )