Skip to content

Commit d9984f3

Browse files
committed
chore: make sure to run repo updated on all command
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
1 parent 98d46e9 commit d9984f3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/openllm/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from openllm.common import CHECKED, INTERACTIVE, VERBOSE_LEVEL, BentoInfo, output
1212
from openllm.local import run as local_run, serve as local_serve
1313
from openllm.model import app as model_app, ensure_bento, list_bento
14-
from openllm.repo import app as repo_app
14+
from openllm.repo import app as repo_app, cmd_update
1515

1616
if typing.TYPE_CHECKING:
1717
from openllm.common import DeploymentTarget
@@ -210,6 +210,7 @@ def serve(
210210
port: int = 3000,
211211
verbose: bool = False,
212212
) -> None:
213+
cmd_update()
213214
if verbose:
214215
VERBOSE_LEVEL.set(20)
215216
target = get_local_machine_spec()
@@ -225,6 +226,7 @@ def run(
225226
timeout: int = 600,
226227
verbose: bool = False,
227228
) -> None:
229+
cmd_update()
228230
if verbose:
229231
VERBOSE_LEVEL.set(20)
230232
target = get_local_machine_spec()
@@ -242,6 +244,7 @@ def deploy(
242244
verbose: bool = False,
243245
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.")
244246
) -> None:
247+
cmd_update()
245248
if verbose:
246249
VERBOSE_LEVEL.set(20)
247250
bento = ensure_bento(model, repo_name=repo)

src/openllm/repo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def cmd_add(name: str, repo: str) -> None:
9090

9191

9292
@app.command(name='default', help='get default repo path')
93-
def default() -> pathlib.Path | None:
93+
def default() -> typing.Optional[pathlib.Path]:
9494
if TEST_REPO:
9595
return None
9696
output((info := parse_repo_url(load_config().repos['default'], 'default')).path)

0 commit comments

Comments
 (0)