From 3cd91e81627f8b60e20d8e029a0bc5e532b5597f Mon Sep 17 00:00:00 2001 From: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Date: Wed, 20 Jan 2021 12:30:24 -0500 Subject: [PATCH] Fix WAND_DISABLED test (#9703) * Fix WAND_DISABLED test * Remove duplicate import * Make a test that actually works... * Fix style --- src/transformers/integrations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/integrations.py b/src/transformers/integrations.py index 8692eefdc3..2eb8b1a8ef 100644 --- a/src/transformers/integrations.py +++ b/src/transformers/integrations.py @@ -54,7 +54,7 @@ from .trainer_utils import PREFIX_CHECKPOINT_DIR, BestRun, EvaluationStrategy # # Integration functions: def is_wandb_available(): - if os.getenv("WANDB_DISABLED"): + if os.getenv("WANDB_DISABLED", "").upper() in ENV_VARS_TRUE_VALUES: return False return importlib.util.find_spec("wandb") is not None