[wandb] restore WANDB_DISABLED=true to disable wandb #9896
Conversation
a few run away backticks @sgugger
this PR proposes a purely cosmetic change that puts all the fp16 args together - so they are easier to manager/read @sgugger
This PR solves part of #9623 It tries to actually do what #9699 requested/discussed and that is any value of `WANDB_DISABLED` should disable wandb. The current behavior is that it has to be one of `ENV_VARS_TRUE_VALUES = {"1", "ON", "YES"}` I have been using `WANDB_DISABLED=true` everywhere in scripts as it was originally advertised. I have no idea why this was changed to a sub-set of possible values. And it's not documented anywhere. @sgugger
|
If I understood correctly the user's issue, the problem was that any value was accepted. We can add "True" in In any case those env variables are now deprecated (have to make a PR to issue a proper warning) since we have the |
That is how I implemented it originally for this PR, but then read user's issue that triggered the PR that broke the original setting, and the issue writer requested a plain - any Also it needs to be documented, so that this disabling is solid and doesn't get changed again and again. If it's documented with just
Well, except this new feature doesn't help in this particular case. As you can see from #9623 and problems as recent as yesterday wandb is still a problem, even if you don't purposefully activate it or even have it installed. I won't be trying to fix this if it worked. Perhaps the default Whatever the outcome, please let's fix so that if one doesn't have wandb installed it shouldn't break things. Thank you. |
Yes, just as I said, adding
By all means, please add documentation in this PR. For now it's documented with the callback but I'm open to any suggestion to make this better.
The bug in #9623 with wandb not installed is linked to something weird in your env as I haven't been able to reproduce it by following your steps. I can add stronger checks that wandb is a proper module by checking its version/authors (like is done for datasets but I have no idea if it will solve your bug or not (since I have no reproducer on my side). If wandb is installed and you pass along nor as the callback is not passed to the Trainer.
As I explained before, that switch will be done in v5, as it is a breaking change. |
|
Thank you for the feedback, @sgugger - PR updated as requested, plus synced trainer_tf with the same solution. |
sgugger
left a comment
There was a problem hiding this comment.
LGTM, thanks for adjusting!
This PR
ENV_VARS_TRUE_VALUESwith "true"WANDB_DISABLED=trueto disable wandbContext: we are still dealing with #9623 where wandb fails no matter if you have it installed or not.
It looks like due to #9699 a few days ago this behavior was changed to be one of
ENV_VARS_TRUE_VALUES = {"1", "ON", "YES"}. And it's not documented anywhere.This PR tries to restore the original behavior where any value of
WANDB_DISABLEDshould disable wandb.And wandb integration is broken, that's why we need a way disable it - it's so annoying when trying to develop and wandb keeps on breaking things whether it's installed or not. See: #9623
Alternatively, instead of the proposed change in this PR, let's document this API that it has to be on of `{"1", "ON", "YES"}``, so that it doesn't change from day to day.
@sgugger