Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Fix --standardize not working (#588)
Browse files Browse the repository at this point in the history
close #587
  • Loading branch information
aguschin authored Jan 27, 2023
1 parent 6181f95 commit f1c4d3b
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions mlem/cli/serve.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import List, Optional

from typer import Option, Typer
from typer import Typer

from mlem.cli.main import (
app,
Expand Down Expand Up @@ -33,22 +33,13 @@
)
app.add_typer(serve)

# Include "--standartize" for historical compatability
option_standardize = Option(
True,
"--standardize/--no-standardize",
"--standartize/--no-standartize",
help="Whether to conform model interface to standard ('predict' method with single arg 'data')",
)


@mlem_group_callback(serve, required=["model", "load"])
def serve_load(
model: str = make_not_required(option_model),
project: Optional[str] = option_project,
rev: Optional[str] = option_rev,
load: Optional[str] = option_load("server"),
standardize: bool = option_standardize,
):
from mlem.api.commands import serve

Expand All @@ -62,7 +53,6 @@ def serve_load(
conf=None,
file_conf=None,
),
standardize=standardize,
)


Expand All @@ -84,7 +74,6 @@ def serve_command(
project: Optional[str] = option_project,
rev: Optional[str] = option_rev,
file_conf: List[str] = option_file_conf("server"),
standardize: bool = option_standardize,
**__kwargs__
):
from mlem.api.commands import serve
Expand All @@ -101,5 +90,4 @@ def serve_command(
file_conf=file_conf,
**__kwargs__
),
standardize=standardize,
)

0 comments on commit f1c4d3b

Please sign in to comment.