Skip to content

Commit

Permalink
Add get best model to serve pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
azuur committed Jan 22, 2024
1 parent 481bbc6 commit 1292ace
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ml_pipelines/deployment/local/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import typer
import uvicorn

from ml_pipelines.deployment.local.common import get_latest_version, get_train_artifacts
from ml_pipelines.deployment.local.common import (
get_best_version,
get_train_artifacts,
)
from ml_pipelines.logic.serve.serve import Point, create_fastapi_app


Expand Down Expand Up @@ -48,10 +51,11 @@ def main(
logger.addHandler(logging.StreamHandler(sys.stdout))

if train_version is None:
train_version = get_latest_version(
train_artifacts_root_path, # type: ignore
"model.pickle",
)
train_version = get_best_version(train_artifacts_root_path) # type: ignore
# train_version = get_latest_version(
# train_artifacts_root_path, # type: ignore
# "model.pickle",
# )

uvicorn_kwargs: dict = {}
run_serve( # noqa: PLR0913
Expand Down

0 comments on commit 1292ace

Please sign in to comment.