-
Notifications
You must be signed in to change notification settings - Fork 19.6k
Add support for all dict methods to ShardedH5IOStroe
.
#21365
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21365 +/- ##
==========================================
+ Coverage 82.70% 82.73% +0.03%
==========================================
Files 565 565
Lines 54894 55022 +128
Branches 8517 8551 +34
==========================================
+ Hits 45398 45523 +125
+ Misses 7415 7404 -11
- Partials 2081 2095 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 for the PR!
@@ -1202,7 +1209,7 @@ def __init__(self, path_or_io, max_shard_size=5, archive=None, mode="r"): | |||
self.archive = archive | |||
self.io_file = None | |||
|
|||
self.max_shard_size = float(max_shard_size) | |||
self.max_shard_size = float(max_shard_size) * 1024**3 # To bytes. |
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.
Is this a behavior change?
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.
No. I simplified the size computation by using a unified unit: bytes.
We don't need to add conversion between bytes and gigabytes now.
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.
LGTM, thank you!
Currently,
len
,keys
,items
,values
,in
anddel
may raise erros in sharding mode.This PR adds
self.current_shard_filenames
to address these issues.The original sharding test has been updated to a more rigorous one.
cc @divyashreepathihalli @laxmareddyp