[WB-7940] Fix excess warning span if requested WANDB_DIR/root_dir is not writable#3304
[WB-7940] Fix excess warning span if requested WANDB_DIR/root_dir is not writable#3304dmitryduev merged 35 commits intomasterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3304 +/- ##
==========================================
+ Coverage 81.39% 81.41% +0.02%
==========================================
Files 234 234
Lines 28709 28719 +10
==========================================
+ Hits 23367 23383 +16
+ Misses 5342 5336 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
| - wandb | ||
| tag: | ||
| skips: | ||
| - platform: win |
There was a problem hiding this comment.
heh, I don't know actually, it was there already, I just move it to a separate yea file :)
| - wandb | ||
| tag: | ||
| skips: | ||
| - platform: win |
| _instance = None | ||
|
|
||
| def __init__(self, settings=None): | ||
| def __init__(self, settings=None) -> None: |
There was a problem hiding this comment.
nit: do you want to type settings?
|
|
||
|
|
||
| def _setup(settings=None, _reset=None): | ||
| def _setup(settings=None, _reset: bool = False) -> Optional["_WandbSetup"]: |
| def setup(settings=None): | ||
| def setup(settings=None) -> Optional["_WandbSetup"]: | ||
| ret = _setup(settings=settings) | ||
| # wandb.termlog("`wandb` session started.", repeat=False) |
There was a problem hiding this comment.
do you want to remove commented out code?
|
|
||
|
|
||
| def setup(settings=None): | ||
| def setup(settings=None) -> Optional["_WandbSetup"]: |
There was a problem hiding this comment.
same do you want to type this?
There was a problem hiding this comment.
This file is still not type-annotated :( I would leave it for a future PR, we should organize a type-annotation sprint or something.
There was a problem hiding this comment.
yeah that's why i nitted it haha
kptkin
left a comment
There was a problem hiding this comment.
Awesome! Such a pleasure to review your PRs!!!
Fixes WB-7940
Description
In this PR:
wandb.login()(orwandb.setup()) beforewandb.init(), the singleton will already be set up and so if e.g. env vars are set/changed in between, they will be ignored, which might not be what the user expects.When running
wandb.init()we will now first check if the singleton exists and if so, check if the environment vars have changed and notify the user if they did.WANDB_DIR/root_dir) is not writable:Testing
Added a
yeatest.