mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-03 17:29:01 +00:00
Fix lint
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
This commit is contained in:
parent
ef214cbfc0
commit
188aef8fa2
4 changed files with 8 additions and 9 deletions
|
@ -293,13 +293,12 @@ class StackBuild(Subcommand):
|
|||
|
||||
if template_name:
|
||||
# copy run.yaml from template to build_dir instead of generating it again
|
||||
template_path = pkg_resources.resource_filename(
|
||||
"llama_stack", f"templates/{template_name}/run.yaml"
|
||||
template_path = (
|
||||
importlib.resources.files("llama_stack")
|
||||
/ f"templates/{template_name}/run.yaml"
|
||||
)
|
||||
os.makedirs(build_dir, exist_ok=True)
|
||||
run_config_file = build_dir / f"{build_config.name}-run.yaml"
|
||||
shutil.copy(template_path, run_config_file)
|
||||
|
||||
with importlib.resources.as_file(template_path) as path:
|
||||
shutil.copy(path, run_config_file)
|
||||
# Find all ${env.VARIABLE} patterns
|
||||
cprint("Build Successful!", color="green")
|
||||
else:
|
||||
|
|
|
@ -52,6 +52,7 @@ class StackRun(Subcommand):
|
|||
|
||||
def _run_stack_run_cmd(self, args: argparse.Namespace) -> None:
|
||||
import importlib.resources
|
||||
|
||||
import yaml
|
||||
|
||||
from llama_stack.distribution.build import ImageType
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
import importlib.resources
|
||||
import logging
|
||||
from enum import Enum
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Dict, List
|
||||
|
||||
import importlib.resources
|
||||
from pydantic import BaseModel
|
||||
from termcolor import cprint
|
||||
|
||||
|
|
|
@ -4,13 +4,12 @@
|
|||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
import importlib.resources
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
import importlib.resources
|
||||
import yaml
|
||||
|
||||
from termcolor import colored
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue