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

chore(artifacts): allow setting artifact cache dir in wandb.init(...) #3644

Merged
merged 2 commits into from
Jan 5, 2023

Conversation

dmitryduev
Copy link
Member

@dmitryduev dmitryduev commented May 9, 2022

Fixes WB-9581, WB-2620

Description

We recognize the WANDB_CACHE_DIR env var that can be used to change the directory where artifacts' cache lands. Here I added a cache_dir setting that if set in a wandb.init(...) call before wandb.sdk.interface.artifacts._artifacts_cache is initialized (with, e.g. a call to wandb.Artifact), will do the same.

Not sure if this is a good idea and would be fine with closing this PR :)

Testing

Added two unit tests.

Checklist

  • Include reference to internal ticket "Fixes WB-NNNN" (and github issue "Fixes #NNNN" if applicable)

@codecov
Copy link

codecov bot commented May 9, 2022

Codecov Report

Merging #3644 (1a84ab0) into main (e3cc081) will increase coverage by 20.46%.
The diff coverage is 100.00%.

❗ Current head 1a84ab0 differs from pull request most recent head d95e9cc. Consider uploading reports for the commit d95e9cc to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #3644       +/-   ##
===========================================
+ Coverage   62.83%   83.29%   +20.46%     
===========================================
  Files         281      280        -1     
  Lines       35303    34945      -358     
===========================================
+ Hits        22184    29109     +6925     
+ Misses      13119     5836     -7283     
Flag Coverage Δ
functest 55.66% <100.00%> (+10.20%) ⬆️
unittest 73.97% <100.00%> (+21.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
wandb/sdk/interface/artifacts.py 79.15% <100.00%> (+11.18%) ⬆️
wandb/sdk/wandb_settings.py 94.48% <100.00%> (+6.93%) ⬆️
wandb/sdk/interface/message_future_poll.py 29.41% <0.00%> (-58.83%) ⬇️
wandb/sdk/interface/interface_grpc.py 60.98% <0.00%> (-5.02%) ⬇️
wandb/sdk/service/server_grpc.py 64.68% <0.00%> (-3.87%) ⬇️
wandb/sdk/launch/runner/gcp_vertex.py 90.09% <0.00%> (-0.91%) ⬇️
wandb/sdk/launch/runner/abstract.py 70.58% <0.00%> (-0.43%) ⬇️
wandb/sdk/launch/runner/aws.py 87.13% <0.00%> (-0.37%) ⬇️
wandb/errors/__init__.py 93.18% <0.00%> (-0.30%) ⬇️
wandb/sdk/launch/agent/agent.py 90.64% <0.00%> (-0.07%) ⬇️
... and 164 more

@dmitryduev dmitryduev requested a review from a team May 10, 2022 18:34
@dmitryduev dmitryduev marked this pull request as ready for review May 24, 2022 07:53
@raubitsj raubitsj added this to the sdk-2022-08.1 milestone Jun 29, 2022
@dmitryduev dmitryduev self-assigned this Jul 28, 2022
@dmitryduev dmitryduev requested review from a team and vwrj July 29, 2022 21:05
@raubitsj raubitsj modified the milestones: sdk-2022-08.1, sdk-2022-09.1 Aug 1, 2022
@dmitryduev
Copy link
Member Author

hey @vwrj, mind weighing in? is this useful or should I just close this PR?

@dmitryduev
Copy link
Member Author

Converting to a draft for now.

@dmitryduev dmitryduev marked this pull request as draft August 19, 2022 17:55
@dmitryduev dmitryduev removed this from the sdk-2022-09.1 milestone Sep 7, 2022
@dmitryduev dmitryduev changed the title Allow setting artifact cache dir in wandb.init(...) chore(artifacts): Allow setting artifact cache dir in wandb.init(...) Dec 19, 2022
@moredatarequired moredatarequired marked this pull request as ready for review December 19, 2022 19:45
@dmitryduev dmitryduev added this to the sdk-2023-01.1 milestone Dec 21, 2022
@dmitryduev dmitryduev merged commit a61fdde into main Jan 5, 2023
@dmitryduev dmitryduev deleted the cache-dir branch January 5, 2023 20:34
@kptkin kptkin changed the title chore(artifacts): Allow setting artifact cache dir in wandb.init(...) chore(artifacts): allow setting artifact cache dir in wandb.init(...) Jan 5, 2023
@github-actions github-actions bot added cc-chore and removed cc-chore labels Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants