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

refactor: YataiService Store Abstraction #1541

Merged
merged 18 commits into from Apr 5, 2021

Conversation

jackyzha0
Copy link
Collaborator

Description

First part of #1540, does the base abstraction for existing YataiService stores so that all session creation is handled by the YataiService implementation rather than within the stores itself. This way, we can add the lock acquisition straight into yatai_service_impl.py.

New module structure:
IMG_CC22886C7627-1

How Has This Been Tested?

  • local unit/integration tests

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

@pep8speaks
Copy link

pep8speaks commented Mar 26, 2021

Hello @jackyzha0, Thanks for updating this PR.

There are currently no PEP 8 issues detected in this PR. Cheers! 🍻

Comment last updated at 2021-03-26 22:20:11 UTC

@jackyzha0 jackyzha0 changed the title refactor: refactor: YataiService Store Abstraction Mar 26, 2021
@codecov
Copy link

codecov bot commented Mar 26, 2021

Codecov Report

Merging #1541 (e44c028) into master (ce9bdd4) will increase coverage by 0.08%.
The diff coverage is 68.97%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1541      +/-   ##
==========================================
+ Coverage   68.85%   68.94%   +0.08%     
==========================================
  Files         152      153       +1     
  Lines       10188    10210      +22     
==========================================
+ Hits         7015     7039      +24     
+ Misses       3173     3171       -2     
Impacted Files Coverage Δ
bentoml/yatai/yatai_service_impl.py 52.65% <43.19%> (+0.90%) ⬆️
bentoml/yatai/db/__init__.py 80.88% <80.88%> (ø)
bentoml/yatai/db/stores/metadata.py 82.35% <82.35%> (ø)
bentoml/yatai/db/stores/label.py 84.52% <84.52%> (ø)
bentoml/yatai/db/stores/deployment.py 84.61% <84.61%> (ø)
bentoml/yatai/client/bento_repository_api.py 63.42% <100.00%> (ø)
bentoml/yatai/db/base.py 100.00% <100.00%> (ø)
...grations/versions/719dd2aacc9a_add_labels_table.py 60.00% <100.00%> (ø)
bentoml/yatai/validator/deployment_pb_validator.py 75.67% <100.00%> (ø)
... and 4 more

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 ce9bdd4...e44c028. Read the comment docs.

@jackyzha0 jackyzha0 requested review from parano and yubozhao and removed request for parano April 2, 2021 21:29
@parano parano merged commit 8f92f12 into bentoml:master Apr 5, 2021
aarnphm pushed a commit to aarnphm/BentoML that referenced this pull request Jul 29, 2022
* fix: makefile sphinx deps

* docs: added batch_serving docs and linked to it in quickstart

* refactor database operations into db class

* remove old db code

* migrate store related functionality to yatai/db/stores module

* makefile + sources typo

* refactor to static classes

* finish static refactor

* fix yatai_service_impl

* fix bad patch in test_usage_stats

* patch metadatastore property naming bug

* lint + format

* more lint + fmt

* lint + format (again)
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.

None yet

3 participants