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

Implement feature uploading bento repo to S3. #356

Merged
merged 1 commit into from Oct 26, 2019
Merged

Implement feature uploading bento repo to S3. #356

merged 1 commit into from Oct 26, 2019

Conversation

1e0ng
Copy link
Contributor

@1e0ng 1e0ng commented Oct 21, 2019

(Thanks for sending a pull request! Please make sure to read the contribution guidelines, then fill out the blanks below.)

What changes were proposed in this pull request?

Does this close any currently open issues?

How was this patch tested?

@codecov-io
Copy link

codecov-io commented Oct 21, 2019

Codecov Report

Merging #356 into master will decrease coverage by 0.08%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #356      +/-   ##
==========================================
- Coverage   53.67%   53.59%   -0.09%     
==========================================
  Files          78       78              
  Lines        5246     5269      +23     
==========================================
+ Hits         2816     2824       +8     
- Misses       2430     2445      +15
Impacted Files Coverage Δ
bentoml/yatai/yatai_service_impl.py 35.17% <ø> (ø) ⬆️
bentoml/deployment/serverless/aws_lambda.py 0% <ø> (ø) ⬆️
bentoml/proto/repository_pb2.py 100% <ø> (ø) ⬆️
bentoml/repository/__init__.py 56.32% <25%> (+0.5%) ⬆️
bentoml/yatai/python_api.py 65.38% <42.3%> (-24.62%) ⬇️

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 00555cd...8e52040. Read the comment docs.

@pep8speaks
Copy link

pep8speaks commented Oct 21, 2019

Hello @leonsim, Thanks for updating this PR.

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

Comment last updated at 2019-10-26 04:50:32 UTC

@1e0ng 1e0ng changed the title Expand an endpoint to support uploading to S3. Implement feature uploading bento repo to S3. Oct 21, 2019
@@ -122,3 +122,6 @@ built-docs

# MacOS X
.DS_Store

# sqlite
storage.db
Copy link
Member

Choose a reason for hiding this comment

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

this should not be created in the repo directory right? curious why adding this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if I install BentoML by pip install -e . then this file will be generated when I run a service.save() command.

bentoml/yatai/python_api.py Outdated Show resolved Hide resolved
bentoml/yatai/python_api.py Outdated Show resolved Hide resolved

# Return URI to saved bento in repository storage
return response.uri.uri
elif response.uri.type == BentoUri.S3:
with tempfile.TemporaryDirectory() as tmpdir:

Copy link
Member

Choose a reason for hiding this comment

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

add something like update_bento_upload_progress(... , InProgress, progress = 0) here? since the upload may take a while

tar.add(tmpdir, arcname=bento_service.name)
fileobj.seek(0, 0)

files = {'file': ('dummy', fileobj)}
Copy link
Member

Choose a reason for hiding this comment

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

could you add a comment about "dummy" here?

@parano
Copy link
Member

parano commented Oct 26, 2019

Thanks for updating the PR @leonsim , merging now!

@parano parano merged commit eeb398c into master Oct 26, 2019
aarnphm pushed a commit to aarnphm/BentoML that referenced this pull request Jul 29, 2022
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

4 participants