mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
Fixes to llama stack commands and update docs
This commit is contained in:
parent
5927f3c3c0
commit
279565499b
4 changed files with 22 additions and 21 deletions
|
@ -44,13 +44,13 @@ class StackConfigure(Subcommand):
|
|||
help="Distribution (one of: {})".format(allowed_ids),
|
||||
)
|
||||
self.parser.add_argument(
|
||||
"--build-name",
|
||||
"--name",
|
||||
type=str,
|
||||
help="Name of the build",
|
||||
required=True,
|
||||
)
|
||||
self.parser.add_argument(
|
||||
"--build-type",
|
||||
"--type",
|
||||
type=str,
|
||||
default="conda_env",
|
||||
choices=[v.value for v in BuildType],
|
||||
|
@ -59,8 +59,8 @@ class StackConfigure(Subcommand):
|
|||
def _run_stack_configure_cmd(self, args: argparse.Namespace) -> None:
|
||||
from llama_toolchain.core.package import BuildType
|
||||
|
||||
build_type = BuildType(args.build_type)
|
||||
name = args.build_name
|
||||
build_type = BuildType(args.type)
|
||||
name = args.name
|
||||
config_file = (
|
||||
BUILDS_BASE_DIR
|
||||
/ args.distribution
|
||||
|
|
|
@ -37,12 +37,13 @@ class StackStart(Subcommand):
|
|||
help="Distribution whose build you want to start",
|
||||
)
|
||||
self.parser.add_argument(
|
||||
"--build-name",
|
||||
"--name",
|
||||
type=str,
|
||||
help="Name of the API build you want to start",
|
||||
required=True,
|
||||
)
|
||||
self.parser.add_argument(
|
||||
"--build-type",
|
||||
"--type",
|
||||
type=str,
|
||||
default="conda_env",
|
||||
choices=[v.value for v in BuildType],
|
||||
|
@ -64,12 +65,12 @@ class StackStart(Subcommand):
|
|||
from llama_toolchain.common.exec import run_with_pty
|
||||
from llama_toolchain.core.package import BuildType
|
||||
|
||||
if args.build_name.endswith(".yaml"):
|
||||
path = args.build_name
|
||||
if args.name.endswith(".yaml"):
|
||||
path = args.name
|
||||
else:
|
||||
build_type = BuildType(args.build_type)
|
||||
build_type = BuildType(args.type)
|
||||
build_dir = BUILDS_BASE_DIR / args.distribution / build_type.descriptor()
|
||||
path = build_dir / f"{args.build_name}.yaml"
|
||||
path = build_dir / f"{args.name}.yaml"
|
||||
|
||||
config_file = Path(path)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue