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

Repository and Deployment refactor and cleanup #771

Merged
merged 9 commits into from
Jun 9, 2020

Conversation

parano
Copy link
Member

@parano parano commented Jun 9, 2020

Description

As part of the effort to improve code quality and make it easier for new contributors to get on board. This PR:

  • Reorganized code around YataiService repository and deployment operator
  • MISC improvement to deployment operator code quality
  • There's no functional change nor user-facing API change

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 (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation
  • Test, CI, or build
  • None

Components (if applicable)

  • BentoService (model packaging, dependency management, handler definition)
  • Model Artifact (model serialization, multi-framework support)
  • Model Server (mico-batching, logging, metrics, tracing, benchmark, OpenAPI)
  • YataiService (model management, deployment automation)
  • Documentation

Checklist:

  • My code follows the bentoml code style, both ./dev/format.sh and
    ./dev/lint.sh script have passed
    (instructions).
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • My change requires a change in bentoml/gallery example notebooks
  • I have sent a pull request to bentoml/gallery to make that change

@parano parano requested a review from yubozhao June 9, 2020 20:37
@codecov
Copy link

codecov bot commented Jun 9, 2020

Codecov Report

Merging #771 into master will increase coverage by 0.28%.
The diff coverage is 72.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #771      +/-   ##
==========================================
+ Coverage   55.04%   55.33%   +0.28%     
==========================================
  Files         105      108       +3     
  Lines        8182     8158      -24     
==========================================
+ Hits         4504     4514      +10     
+ Misses       3678     3644      -34     
Impacted Files Coverage Δ
bentoml/clipper/__init__.py 0.00% <0.00%> (ø)
bentoml/configuration/__init__.py 77.77% <ø> (ø)
bentoml/saved_bundle/pip_pkg.py 96.09% <ø> (ø)
bentoml/saved_bundle/py_module_utils.py 86.27% <ø> (ø)
bentoml/saved_bundle/templates.py 100.00% <ø> (ø)
bentoml/utils/usage_stats.py 78.88% <0.00%> (ø)
.../deployment/aws_lambda/download_extra_resources.py 0.00% <ø> (ø)
bentoml/yatai/deployment/aws_lambda/lambda_app.py 90.32% <ø> (ø)
bentoml/yatai/deployment/aws_lambda/utils.py 27.77% <ø> (ø)
bentoml/yatai/deployment/sagemaker/model_server.py 0.00% <ø> (ø)
... and 82 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 e69f003...541c8ff. Read the comment docs.

@parano parano merged commit 4406531 into bentoml:master Jun 9, 2020
@@ -37,7 +37,7 @@ def _serve():
subprocess.check_call(['ln', '-sf', '/dev/stdout', '/var/log/nginx/access.log'])
subprocess.check_call(['ln', '-sf', '/dev/stderr', '/var/log/nginx/error.log'])

nginx = subprocess.Popen(['nginx', '-c', '/opt/program/nginx.conf'])
nginx = subprocess.Popen(['nginx', '-c', '/bento/nginx.conf'])
Copy link
Member Author

Choose a reason for hiding this comment

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

ping @yubozhao for visibility

flosincapite pushed a commit to MLH-Fellowship/BentoML that referenced this pull request Jun 9, 2020
* make sagemaker docker image have same file structure

* use consistent file names

* move operator code out of __init__ to avoid loading unused code in model server startup

* refactor deployment validator

* reorganize bento repository code

* deployment valiator test&linting error fix

* more repository code cleanup

* renaming and adding inline comments

* move out lambda operator code to separate file
parano pushed a commit that referenced this pull request Jun 10, 2020
* Repository and Deployment refactor and cleanup (#771)

* make sagemaker docker image have same file structure

* use consistent file names

* move operator code out of __init__ to avoid loading unused code in model server startup

* refactor deployment validator

* reorganize bento repository code

* deployment valiator test&linting error fix

* more repository code cleanup

* renaming and adding inline comments

* move out lambda operator code to separate file

* Improve robustness of shell scripts

* Fix header

* Fix issues in generate.sh

* Fix -type in call to find

Co-authored-by: cory <cory.massaro@gmail.com>
parano added a commit that referenced this pull request Jun 16, 2020
* Repository and Deployment refactor and cleanup (#771)

* make sagemaker docker image have same file structure

* use consistent file names

* move operator code out of __init__ to avoid loading unused code in model server startup

* refactor deployment validator

* reorganize bento repository code

* deployment valiator test&linting error fix

* more repository code cleanup

* renaming and adding inline comments

* move out lambda operator code to separate file

* fix some typos + adding logging to lambda callback

* fix some linting problems

* fix mock not returning proper form

* add trailing comma

* add better logging + docs

* whitespace fixes

* move logging and consolidate debug line

* update docs + fixed logging

* fix linting issues

* remove redundant logging and switch to bento logger

* update docs

Co-authored-by: Chaoyu <paranoyang@gmail.com>
Co-authored-by: cory <cory.massaro@gmail.com>
parano added a commit that referenced this pull request Jun 22, 2020
* Repository and Deployment refactor and cleanup (#771)

* make sagemaker docker image have same file structure

* use consistent file names

* move operator code out of __init__ to avoid loading unused code in model server startup

* refactor deployment validator

* reorganize bento repository code

* deployment valiator test&linting error fix

* more repository code cleanup

* renaming and adding inline comments

* move out lambda operator code to separate file

* fixed dockerfile to use multi-stage builds

* add some docs for alternative docker images

* add bash script support for building multiple python versions

* add more docs

* update name of docker files to reflect naming conventions and fixed docs

Co-authored-by: Chaoyu <paranoyang@gmail.com>
Co-authored-by: cory <cory.massaro@gmail.com>
xiwang129 pushed a commit to MLH-Fellowship/BentoML that referenced this pull request Jul 24, 2020
* make sagemaker docker image have same file structure

* use consistent file names

* move operator code out of __init__ to avoid loading unused code in model server startup

* refactor deployment validator

* reorganize bento repository code

* deployment valiator test&linting error fix

* more repository code cleanup

* renaming and adding inline comments

* move out lambda operator code to separate file
xiwang129 pushed a commit to MLH-Fellowship/BentoML that referenced this pull request Jul 28, 2020
* make sagemaker docker image have same file structure

* use consistent file names

* move operator code out of __init__ to avoid loading unused code in model server startup

* refactor deployment validator

* reorganize bento repository code

* deployment valiator test&linting error fix

* more repository code cleanup

* renaming and adding inline comments

* move out lambda operator code to separate file
aarnphm pushed a commit to aarnphm/BentoML that referenced this pull request Jul 29, 2022
* make sagemaker docker image have same file structure

* use consistent file names

* move operator code out of __init__ to avoid loading unused code in model server startup

* refactor deployment validator

* reorganize bento repository code

* deployment valiator test&linting error fix

* more repository code cleanup

* renaming and adding inline comments

* move out lambda operator code to separate file
aarnphm pushed a commit to aarnphm/BentoML that referenced this pull request Jul 29, 2022
* Repository and Deployment refactor and cleanup (bentoml#771)

* make sagemaker docker image have same file structure

* use consistent file names

* move operator code out of __init__ to avoid loading unused code in model server startup

* refactor deployment validator

* reorganize bento repository code

* deployment valiator test&linting error fix

* more repository code cleanup

* renaming and adding inline comments

* move out lambda operator code to separate file

* Improve robustness of shell scripts

* Fix header

* Fix issues in generate.sh

* Fix -type in call to find

Co-authored-by: cory <cory.massaro@gmail.com>
aarnphm pushed a commit to aarnphm/BentoML that referenced this pull request Jul 29, 2022
* Repository and Deployment refactor and cleanup (bentoml#771)

* make sagemaker docker image have same file structure

* use consistent file names

* move operator code out of __init__ to avoid loading unused code in model server startup

* refactor deployment validator

* reorganize bento repository code

* deployment valiator test&linting error fix

* more repository code cleanup

* renaming and adding inline comments

* move out lambda operator code to separate file

* fix some typos + adding logging to lambda callback

* fix some linting problems

* fix mock not returning proper form

* add trailing comma

* add better logging + docs

* whitespace fixes

* move logging and consolidate debug line

* update docs + fixed logging

* fix linting issues

* remove redundant logging and switch to bento logger

* update docs

Co-authored-by: Chaoyu <paranoyang@gmail.com>
Co-authored-by: cory <cory.massaro@gmail.com>
aarnphm pushed a commit to aarnphm/BentoML that referenced this pull request Jul 29, 2022
* Repository and Deployment refactor and cleanup (bentoml#771)

* make sagemaker docker image have same file structure

* use consistent file names

* move operator code out of __init__ to avoid loading unused code in model server startup

* refactor deployment validator

* reorganize bento repository code

* deployment valiator test&linting error fix

* more repository code cleanup

* renaming and adding inline comments

* move out lambda operator code to separate file

* fixed dockerfile to use multi-stage builds

* add some docs for alternative docker images

* add bash script support for building multiple python versions

* add more docs

* update name of docker files to reflect naming conventions and fixed docs

Co-authored-by: Chaoyu <paranoyang@gmail.com>
Co-authored-by: cory <cory.massaro@gmail.com>
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

1 participant