mirror of
https://github.com/bentoml/OpenLLM.git
synced 2025-12-23 23:57:46 -05:00
chore: make sure to run repo updated on all command
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
@@ -11,7 +11,7 @@ from openllm.cloud import deploy as cloud_deploy, ensure_cloud_context, get_clou
|
||||
from openllm.common import CHECKED, INTERACTIVE, VERBOSE_LEVEL, BentoInfo, output
|
||||
from openllm.local import run as local_run, serve as local_serve
|
||||
from openllm.model import app as model_app, ensure_bento, list_bento
|
||||
from openllm.repo import app as repo_app
|
||||
from openllm.repo import app as repo_app, cmd_update
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from openllm.common import DeploymentTarget
|
||||
@@ -210,6 +210,7 @@ def serve(
|
||||
port: int = 3000,
|
||||
verbose: bool = False,
|
||||
) -> None:
|
||||
cmd_update()
|
||||
if verbose:
|
||||
VERBOSE_LEVEL.set(20)
|
||||
target = get_local_machine_spec()
|
||||
@@ -225,6 +226,7 @@ def run(
|
||||
timeout: int = 600,
|
||||
verbose: bool = False,
|
||||
) -> None:
|
||||
cmd_update()
|
||||
if verbose:
|
||||
VERBOSE_LEVEL.set(20)
|
||||
target = get_local_machine_spec()
|
||||
@@ -242,6 +244,7 @@ def deploy(
|
||||
verbose: bool = False,
|
||||
env: typing.Optional[list[str]] = typer.Option(None, "--env", help="Environment variables to pass to the deployment command. Format: NAME or NAME=value. Can be specified multiple times.")
|
||||
) -> None:
|
||||
cmd_update()
|
||||
if verbose:
|
||||
VERBOSE_LEVEL.set(20)
|
||||
bento = ensure_bento(model, repo_name=repo)
|
||||
|
||||
@@ -90,7 +90,7 @@ def cmd_add(name: str, repo: str) -> None:
|
||||
|
||||
|
||||
@app.command(name='default', help='get default repo path')
|
||||
def default() -> pathlib.Path | None:
|
||||
def default() -> typing.Optional[pathlib.Path]:
|
||||
if TEST_REPO:
|
||||
return None
|
||||
output((info := parse_repo_url(load_config().repos['default'], 'default')).path)
|
||||
|
||||
Reference in New Issue
Block a user