Unverified Commit fb0589a0 authored by Stas Bekman's avatar Stas Bekman Committed by GitHub
Browse files

don't complain about missing W&B when WANDB_DISABLED=true (#6036)

* don't complain about missing W&B when WANDB_DISABLED=true

* reformat to elif

* typo
parent daa5dd12
...@@ -203,7 +203,7 @@ class Trainer: ...@@ -203,7 +203,7 @@ class Trainer:
) )
if is_wandb_available(): if is_wandb_available():
self.setup_wandb() self.setup_wandb()
else: elif os.environ.get("WANDB_DISABLED") != "true":
logger.info( logger.info(
"You are instantiating a Trainer but W&B is not installed. To use wandb logging, " "You are instantiating a Trainer but W&B is not installed. To use wandb logging, "
"run `pip install wandb; wandb login` see https://docs.wandb.com/huggingface." "run `pip install wandb; wandb login` see https://docs.wandb.com/huggingface."
......
...@@ -90,7 +90,7 @@ class TFTrainer: ...@@ -90,7 +90,7 @@ class TFTrainer:
if is_wandb_available(): if is_wandb_available():
self._setup_wandb() self._setup_wandb()
else: elif os.environ.get("WANDB_DISABLED") != "true":
logger.info( logger.info(
"You are instantiating a Trainer but W&B is not installed. To use wandb logging, " "You are instantiating a Trainer but W&B is not installed. To use wandb logging, "
"run `pip install wandb; wandb login` see https://docs.wandb.com/huggingface." "run `pip install wandb; wandb login` see https://docs.wandb.com/huggingface."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment