deeplake icon indicating copy to clipboard operation
deeplake copied to clipboard

Variable local cache prefix

Open GMW99 opened this issue 3 years ago β€’ 10 comments

πŸš€ πŸš€ 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-rate up
  • [ 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.

GMW99 avatar Aug 30 '22 10:08 GMW99

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 30 '22 10:08 CLAassistant

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.

mikayelh avatar Aug 31 '22 09:08 mikayelh

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?

GMW99 avatar Aug 31 '22 12:08 GMW99

Hi @Diveafall Thanks for the review, didn't realise that getenv could have a set default. :-)

GMW99 avatar Aug 31 '22 12:08 GMW99

@GMW99 hey there! It's slack.activeloop.ai, feel free to hit me up when you join. :)

mikayelh avatar Aug 31 '22 16:08 mikayelh

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.

codecov[bot] avatar Aug 31 '22 19:08 codecov[bot]

Hi @GMW99! Thanks for your contribution. Would you mind signing the CLA, while we review your PR.

tatevikh avatar Sep 01 '22 09:09 tatevikh

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 avatar Sep 01 '22 10:09 GMW99

@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.

tatevikh avatar Sep 01 '22 10:09 tatevikh

Hey @GMW99 , thanks a lot for your contribution! Can you pls pull main and fix the conflicts. This should be good to go otherwise.

tatevikh avatar Sep 22 '22 07:09 tatevikh

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 :-)

GMW99 avatar Oct 05 '22 08:10 GMW99