Variable local cache prefix
π π Pull Request
Checklist:
- [ x ] My code follows the style guidelines of this project and the Contributing document
- [ x ] I have commented my code, particularly in hard-to-understand areas
- [ x ] I have kept the
coverage-rateup - [ x ] I have performed a self-review of my own code and resolved any problems
- [ x ] I have checked to ensure there aren't any other open Pull Requests for the same change
- [ x ] I have described and made corresponding changes to the relevant documentation
- [ x ] New and existing unit tests pass locally with my changes
Changes
This pull request allows for the LOCAL_CACHE_PREFIX to be changed via an environment variable. However, if it is not changed, it will default to the value within constants.py
This allows for greater flexibility when using the PyTorch data loader and similar that default to using the LOCAL_CACHE_PREFIX by allowing the user to specify the location the cache should be stored. Example situations included when using mounted filesystems that can act as fast cache storage.
hey @GMW99 , thank you so much for the valuable contribution. The team has included this into the review queue and will get back to you shortly. Are you by any chance a part of our slack community? We discuss development of new features/ feature requests there, so you're welcome to join (also text me there - @MIkayel, so we can send you some contributor stickers!). Thanks a lot, M.
Hi @mikayelh thank you, I am not a part of the slack community, but I'd be more than happy to join. How do I join?
Hi @Diveafall Thanks for the review, didn't realise that getenv could have a set default. :-)
@GMW99 hey there! It's slack.activeloop.ai, feel free to hit me up when you join. :)
Codecov Report
Base: 89.87% // Head: 89.21% // Decreases project coverage by -0.65% :warning:
Coverage data is based on head (
2412b2a) compared to base (c13e4a9). Patch coverage: 75.00% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## main #1839 +/- ##
==========================================
- Coverage 89.87% 89.21% -0.66%
==========================================
Files 248 248
Lines 26518 26124 -394
==========================================
- Hits 23832 23306 -526
- Misses 2686 2818 +132
| Flag | Coverage Ξ | |
|---|---|---|
| unittests | 89.21% <75.00%> (-0.66%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Ξ | |
|---|---|---|
| deeplake/core/dataset/dataset.py | 92.83% <ΓΈ> (-0.17%) |
:arrow_down: |
| deeplake/util/cache_chain.py | 82.35% <50.00%> (-2.03%) |
:arrow_down: |
| deeplake/util/storage.py | 97.40% <100.00%> (+0.03%) |
:arrow_up: |
| deeplake/api/tests/test_sample_info.py | 72.72% <0.00%> (-27.28%) |
:arrow_down: |
| deeplake/api/tests/test_api_with_compression.py | 90.27% <0.00%> (-9.73%) |
:arrow_down: |
| deeplake/core/compression.py | 72.92% <0.00%> (-8.02%) |
:arrow_down: |
| ...ake/integrations/tf/deeplake_tensorflow_dataset.py | 66.27% <0.00%> (-7.83%) |
:arrow_down: |
| deeplake/core/tests/test_compression.py | 61.53% <0.00%> (-6.76%) |
:arrow_down: |
| deeplake/experimental/test_query.py | 27.27% <0.00%> (-6.07%) |
:arrow_down: |
| deeplake/experimental/test_pytorch.py | 20.43% <0.00%> (-4.17%) |
:arrow_down: |
| ... and 78 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Hi @GMW99! Thanks for your contribution. Would you mind signing the CLA, while we review your PR.
Hi @GMW99! Thanks for your contribution. Would you mind signing the CLA, while we review your PR.
Hey, @tatevikh I have signed the CLA the initial commits were done without my user.email setup on git so is blank. I then rebased to change this. However, the commits still stayed. Would you like me to rebase again and change the authorship of the commits without an author? I've never used CLA assist before, so I am unsure of the best approach.
@GMW99
Hi @GMW99! Thanks for your contribution. Would you mind signing the CLA, while we review your PR.
Hey, @tatevikh I have signed the CLA the initial commits were done without my user.email setup on git so is blank. I then rebased to change this. However, the commits still stayed. Would you like me to rebase again and change the authorship of the commits without an author? I've never used CLA assist before, so I am unsure of the best approach.
No problem:) Changing the commit author should work fine. Generally, CLA assistant needs only to be triggered via a webhook in order to reflect it on the PR.
Hey @GMW99 , thanks a lot for your contribution! Can you pls pull main and fix the conflicts. This should be good to go otherwise.
Hey @GMW99 , thanks a lot for your contribution! Can you pls pull main and fix the conflicts. This should be good to go otherwise.
Hi, @tatevikh sorry for the delay. That should all be done now :-)