mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 01:48:05 +00:00
fix: fix llama stack list
llama stack list was still using build.yaml, convert cmd and tests to just use config.yaml Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
parent
94506126ae
commit
b2ab5c2807
2 changed files with 10 additions and 14 deletions
|
|
@ -59,19 +59,17 @@ class StackListBuilds(Subcommand):
|
||||||
print("No distributions found")
|
print("No distributions found")
|
||||||
return
|
return
|
||||||
|
|
||||||
headers = ["Stack Name", "Source", "Path", "Build Config", "Run Config"]
|
headers = ["Stack Name", "Source", "Path", "Config"]
|
||||||
rows = []
|
rows = []
|
||||||
for name, (path, source_type) in sorted(distributions.items()):
|
for name, (path, source_type) in sorted(distributions.items()):
|
||||||
row = [name, source_type, str(path)]
|
row = [name, source_type, str(path)]
|
||||||
# Check for build and run config files
|
# Check for config files
|
||||||
# For built-in distributions, configs are named build.yaml and config.yaml
|
# For built-in distributions, configs are named config.yaml
|
||||||
# For custom distributions, configs are named {name}-build.yaml and {name}-config.yaml
|
# For custom distributions, configs are named {name}-config.yaml
|
||||||
if source_type == "built-in":
|
if source_type == "built-in":
|
||||||
build_config = "Yes" if (path / "build.yaml").exists() else "No"
|
config = "Yes" if (path / "config.yaml").exists() else "No"
|
||||||
run_config = "Yes" if (path / "config.yaml").exists() else "No"
|
|
||||||
else:
|
else:
|
||||||
build_config = "Yes" if (path / f"{name}-build.yaml").exists() else "No"
|
config = "Yes" if (path / f"{name}-config.yaml").exists() else "No"
|
||||||
run_config = "Yes" if (path / f"{name}-config.yaml").exists() else "No"
|
row.extend([config])
|
||||||
row.extend([build_config, run_config])
|
|
||||||
rows.append(row)
|
rows.append(row)
|
||||||
print_table(rows, headers, separate_rows=True)
|
print_table(rows, headers, separate_rows=True)
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,7 @@ def mock_distribs_base_dir(tmp_path):
|
||||||
# Create a custom distribution
|
# Create a custom distribution
|
||||||
starter_custom = custom_dir / "starter"
|
starter_custom = custom_dir / "starter"
|
||||||
starter_custom.mkdir()
|
starter_custom.mkdir()
|
||||||
(starter_custom / "starter-build.yaml").write_text("# build config")
|
(starter_custom / "starter-config.yaml").write_text("# config")
|
||||||
(starter_custom / "starter-config.yaml").write_text("# run config")
|
|
||||||
|
|
||||||
return custom_dir
|
return custom_dir
|
||||||
|
|
||||||
|
|
@ -47,8 +46,7 @@ def mock_distro_dir(tmp_path):
|
||||||
for distro_name in ["starter", "nvidia", "dell"]:
|
for distro_name in ["starter", "nvidia", "dell"]:
|
||||||
distro_path = distro_dir / distro_name
|
distro_path = distro_dir / distro_name
|
||||||
distro_path.mkdir()
|
distro_path.mkdir()
|
||||||
(distro_path / "build.yaml").write_text("# build config")
|
(distro_path / "config.yaml").write_text("# config")
|
||||||
(distro_path / "config.yaml").write_text("# run config")
|
|
||||||
|
|
||||||
return distro_dir
|
return distro_dir
|
||||||
|
|
||||||
|
|
@ -112,7 +110,7 @@ class TestStackList:
|
||||||
# Add a hidden directory
|
# Add a hidden directory
|
||||||
hidden_dir = mock_distro_dir / ".hidden"
|
hidden_dir = mock_distro_dir / ".hidden"
|
||||||
hidden_dir.mkdir()
|
hidden_dir.mkdir()
|
||||||
(hidden_dir / "build.yaml").write_text("# build")
|
(hidden_dir / "config.yaml").write_text("# config")
|
||||||
|
|
||||||
# Add a __pycache__ directory
|
# Add a __pycache__ directory
|
||||||
pycache_dir = mock_distro_dir / "__pycache__"
|
pycache_dir = mock_distro_dir / "__pycache__"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue