-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Adapters #1056
Refactor Adapters #1056
Conversation
Codecov Report
@@ Coverage Diff @@
## refactor-adapters #1056 +/- ##
======================================================
- Coverage 63.39% 34.07% -29.33%
======================================================
Files 124 128 +4
Lines 8259 7895 -364
======================================================
- Hits 5236 2690 -2546
- Misses 3023 5205 +2182
Continue to review full report at Codecov.
|
c921985
to
b9fa86a
Compare
bentoml/_version.py
Outdated
pieces["long"] = full_out | ||
pieces["short"] = full_out[:7] # maybe improved later | ||
pieces["error"] = None | ||
pieces = {"long": full_out, "short": full_out[:7], "error": None} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason for this change? this is actually not our code, it is from the versioneer project
bentoml/adapters/default_output.py
Outdated
return detect_suitable_adapter(result[s]) | ||
if isinstance(result, (list, tuple)): | ||
return detect_suitable_adapter(result[0]) | ||
# if isinstance(result, (list, tuple)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
bentoml/adapters/dataframe_input.py
Outdated
"Missing required dependency 'pandas' for DataframeInput, install " | ||
"with `pip install pandas`" | ||
) | ||
if typ != "frame": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the docs above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to just remove the typ
parameter?
bentoml/service.py
Outdated
""" | ||
|
||
def decorator(func): | ||
_api_name = func.__name__ if api_name is None else api_name | ||
validate_inference_api_name(_api_name) | ||
|
||
if input is None: | ||
# support bentoml<=0.7 | ||
# Support passing the desired adapter without instantiation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "Raise error when input adapter class passed without instantiation"
bentoml/service.py
Outdated
|
||
def handle_cli(self, cli_args: Sequence[str]) -> int: | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("--max-batch-size", default=sys.maxsize, type=int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we set a somewhat practical default value here? e.g. 1000?
e8825a1
to
8bf1314
Compare
f8e16d7
to
8bf1314
Compare
Moved to #1070 |
Description
Motivation and Context
How Has This Been Tested?
Types of changes
Component(s) if applicable
Checklist:
./dev/format.sh
and./dev/lint.sh
script have passed(instructions).