Skip to content
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

[Feature] Customizable request schema #1347

Merged
merged 7 commits into from
Mar 1, 2021
Merged

Conversation

bojiang
Copy link
Member

@bojiang bojiang commented Dec 19, 2020

Description

Motivation and Context

How Has This Been Tested?

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature and improvements (non-breaking change which adds/improves functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Code Refactoring (internal change which is not user facing)
  • Documentation
  • Test, CI, or build

Component(s) if applicable

  • BentoService (service definition, dependency management, API input/output adapters)
  • Model Artifact (model serialization, multi-framework support)
  • Model Server (mico-batching, dockerisation, logging, OpenAPI, instruments)
  • YataiService gRPC server (model registry, cloud deployment automation)
  • YataiService web server (nodejs HTTP server and web UI)
  • Internal (BentoML's own configuration, logging, utility, exception handling)
  • BentoML CLI

Checklist:

  • My code follows the bentoml code style, both ./dev/format.sh and
    ./dev/lint.sh script have passed
    (instructions).
  • My change reduces project test coverage and requires unit tests to be added
  • I have added unit tests covering my code change
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@bojiang bojiang added the pr/merge-hold Requires further discussions before a pull request can be merged label Dec 19, 2020
@codecov
Copy link

codecov bot commented Dec 19, 2020

Codecov Report

Merging #1347 (7b5d0fc) into master (cc104f9) will decrease coverage by 0.00%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1347      +/-   ##
==========================================
- Coverage   67.92%   67.92%   -0.01%     
==========================================
  Files         150      150              
  Lines       10042    10045       +3     
==========================================
+ Hits         6821     6823       +2     
- Misses       3221     3222       +1     
Impacted Files Coverage Δ
bentoml/service/inference_api.py 85.25% <66.66%> (-0.46%) ⬇️
bentoml/adapters/base_input.py 72.44% <100.00%> (+0.28%) ⬆️
bentoml/saved_bundle/templates.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc104f9...7b5d0fc. Read the comment docs.

@bojiang bojiang linked an issue Dec 19, 2020 that may be closed by this pull request
@bojiang bojiang changed the title [Feature] Customize request schema [Feat] Customizable request schema Dec 19, 2020
@bojiang bojiang changed the title [Feat] Customizable request schema [Feature] Customizable request schema Dec 19, 2020
@@ -50,6 +50,7 @@ message BentoServiceMetadata {
int32 mb_max_latency = 7;
int32 mb_max_batch_size = 8;
bool batch = 9;
string route = 10;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is part of the #1334 ? I guess we are holding this after that PR merge in?

@Trollgeir
Copy link

Might I suggest supporting pydantic for model schemas? It'll give BentoML field validation/errors/schema out of the box.

@bojiang
Copy link
Member Author

bojiang commented Feb 25, 2021

Might I suggest supporting pydantic for model schemas? It'll give BentoML field validation/errors/schema out of the box.

@Trollgeir Appreciate it. This PR is just minimal changes to make it possible.

@bojiang bojiang removed the pr/merge-hold Requires further discussions before a pull request can be merged label Feb 26, 2021
@bojiang
Copy link
Member Author

bojiang commented Feb 26, 2021

@yubozhao ready for review

@yubozhao
Copy link
Contributor

yubozhao commented Mar 1, 2021

LGTM. Merging it

@Trollgeir I think that's a great suggestion. Let's create a different issue and PR to track include Pydantic for validation

@yubozhao yubozhao merged commit 772b765 into bentoml:master Mar 1, 2021
@bojiang bojiang deleted the dev4 branch March 2, 2021 01:58
aarnphm pushed a commit to aarnphm/BentoML that referenced this pull request Jul 29, 2022
* customize schema

* test customezed_schema

* fix

* finish test

* fix

* fix new-style property

* refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customize request schema in swagger
3 participants