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

Made Dataset and LRUCache objects pickleable #1049

Merged
merged 16 commits into from Jul 20, 2021
Merged

Made Dataset and LRUCache objects pickleable #1049

merged 16 commits into from Jul 20, 2021

Conversation

AbhinavTuli
Copy link
Contributor

The code block below now works:

ds = Dataset("path/to/dataset")
pickled_ds = pickle.dumps(ds)
unpickled_ds = pickle.loads(pickled_ds)

@codecov
Copy link

codecov bot commented Jul 15, 2021

Codecov Report

Merging #1049 (862a12b) into main (e2be96b) will increase coverage by 0.22%.
The diff coverage is 98.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1049      +/-   ##
==========================================
+ Coverage   89.76%   89.98%   +0.22%     
==========================================
  Files          94       95       +1     
  Lines        4190     4244      +54     
==========================================
+ Hits         3761     3819      +58     
+ Misses        429      425       -4     
Impacted Files Coverage Δ
hub/core/storage/s3.py 87.78% <0.00%> (+1.32%) ⬆️
hub/api/dataset.py 94.11% <100.00%> (+1.70%) ⬆️
hub/api/tests/test_api.py 99.16% <100.00%> (-0.01%) ⬇️
hub/api/tests/test_pickle.py 100.00% <100.00%> (ø)
hub/core/storage/lru_cache.py 96.12% <100.00%> (+0.39%) ⬆️
hub/core/storage/memory.py 100.00% <100.00%> (ø)
hub/core/storage/provider.py 98.03% <100.00%> (+0.03%) ⬆️
hub/core/storage/tests/test_storage_provider.py 100.00% <100.00%> (ø)
hub/tests/storage_fixtures.py 100.00% <100.00%> (ø)
hub/util/exceptions.py 76.88% <100.00%> (+0.33%) ⬆️
... and 2 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 e2be96b...862a12b. Read the comment docs.

Copy link
Contributor

@verbose-void verbose-void left a comment

Choose a reason for hiding this comment

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

re-base and add a new fixture

hub/api/dataset.py Outdated Show resolved Hide resolved
@AbhinavTuli AbhinavTuli merged commit 415f9d5 into main Jul 20, 2021
@AbhinavTuli AbhinavTuli deleted the pickle_dataset branch July 20, 2021 07:14
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