-
Notifications
You must be signed in to change notification settings - Fork 712
Fix dynamic commit size #3016
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
Fix dynamic commit size #3016
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
@bot /style |
Style fixes have been applied. View the workflow run here. |
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.
Very clean PR @maximizemaxwell, thanks for opening it! Using a lock and the LargeUploadStatus
object is an elegant solution :)
I've left a comment regarding the increase/decrease policy itself but otherwise looks good to me. Before getting this merged, could you create a new module tests/test_upload_large_folder.py
and add a few tests for LargeUploadStatus.target_chunk/update_chunk
(no need to upload/create any data, just having unit tests on these two). You can check a few cases (never below 0 or above scale, update only if commit was full, etc.). No need to use anything from unittest
in the test module, just plain pytest stuff is great. You can check tests/test_serialization.py
as an example. Let me know if you have any question!
Co-authored-by: Lucain <[email protected]>
Co-authored-by: Lucain <[email protected]>
Co-authored-by: Lucain <[email protected]>
Added some tests, could you review those? @Wauplin |
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.
Thanks @maximizemaxwell for the contribution! I left a small comment, but everything else looks great 🤗
Co-authored-by: célina <[email protected]>
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.
thank you @maximizemaxwell for the clean PR 🤗
let's wait for a final review from @Wauplin and then we will be able to merge
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.
Thank you very much! Let's get this merged 🎉
What does this PR do?
_upload_large_folder.py
:Related Issue
Dynamic commit sizes in upload-large-folder #3010
Review
@Wauplin could you review this code?