# How to turn WanDB off in trainer?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%3E%5C
**Category:** Beginners\
**Created:** [May 18, 2021, 9:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237 "2021-05-18T21:22:53Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgedittmar](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@georgedittmar](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fgeorgedittmar)%5C
**Post date:** [May 18, 2021, 9:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F1 "2021-05-18T21:22:53Z")

</div>

I am trying to use the trainer to fine tune a bert model but it keeps trying to connect to wandb and I dont know what that is and just want it off. is there a config I am missing?

---

<div class="post-metadata">

**Author:** ![helloworld123-lab](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@helloworld123-lab](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhelloworld123-lab)%5C
**Post date:** [May 19, 2021, 1:32am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F2 "2021-05-19T01:32:09Z")

</div>

import os  
os.environ[“WANDB\_DISABLED”] = “true”  
This works for me.

---

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flewtun)%5C
**Post date:** [May 19, 2021, 11:53am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F3 "2021-05-19T11:53:32Z")

</div>

alternatively, you can disable the weights and biases ([wandb](https://wandb.ai/site)) callback in the `TrainingArguments` [directly](https://huggingface.co/transformers/main_classes/trainer.html?highlight=trainingarguments#trainingarguments):

```auto
# None disables all integrations
args = TrainingArguments(report_to=None, ...)
```

---

<div class="post-metadata">

**Author:** ![bui](https://avatars.discourse-cdn.com/v4/letter/b/91b2a8/32.png) [@bui](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fbui)%5C
**Post date:** [November 26, 2021, 8:30am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F4 "2021-11-26T08:30:38Z")

</div>

It should be “none”, not `None`

---

<div class="post-metadata">

**Author:** ![hiramcho](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hiramcho/32/4122_2.png) [@hiramcho](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhiramcho)%5C
**Post date:** [February 23, 2022, 2:15am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F5 "2022-02-23T02:15:42Z")

</div>

Hi after doing that i have the following error: “Error: You must call wandb.init() before wandb.log()”

---

<div class="post-metadata">

**Author:** ![scottire](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/scottire/32/2685_2.png) [@scottire](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fscottire)%5C
**Post date:** [February 25, 2022, 10:54am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F6 "2022-02-25T10:54:41Z")

</div>

Hi @hiramcho, check out the docs on the logger to solve that issue. You just need to call `wandb.init(project='your_project_name')` somewhere before you start using the logger. [https://docs.wandb.ai/guides/integrations/huggingface](https://docs.wandb.ai/guides/integrations/huggingface)

---

<div class="post-metadata">

**Author:** ![ndvb](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ndvb/32/17239_2.png) [@ndvb](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fndvb)%5C
**Post date:** [February 12, 2023, 8:32pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F7 "2023-02-12T20:32:44Z")

</div>

For me, I want wandb, but I don’t like the many prints during training.  
Even though I set the logging level to be WARNING, I still get many:

```auto

Generate config GenerationConfig {
  "decoder_start_token_id": 0,
  "eos_token_id": 1,
  "pad_token_id": 0,
  "transformers_version": "4.26.0"
}

```

How do I turn this print off? (Print is in configuration\_utils.py:543)

---

<div class="post-metadata">

**Author:** ![yesaso8389](https://avatars.discourse-cdn.com/v4/letter/y/54ee81/32.png) [@yesaso8389](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fyesaso8389)%5C
**Post date:** [March 20, 2023, 10:54pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F8 "2023-03-20T22:54:29Z")

</div>

I get these annoying prints when running on Kaggle

Generate config GenerationConfig {  
“decoder\_start\_token\_id”: 0,  
“eos\_token\_id”: 1,  
“pad\_token\_id”: 0,  
“transformers\_version”: “4.26.0”  
}

when the code starts evaluation  
it prints each step

how to tun it off Please  
???

---

<div class="post-metadata">

**Author:** ![mspinaci](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@mspinaci](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmspinaci)%5C
**Post date:** [March 22, 2023, 1:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F9 "2023-03-22T13:25:34Z")

</div>

I also had the same issue with the annoying `Generate config GenerationConfig` lines. In my case, upgrading from transformers 4.26.0 to 4.27.2 solved the issue.

---

<div class="post-metadata">

**Author:** ![jasonwu](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jasonwu](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjasonwu)%5C
**Post date:** [April 5, 2023, 3:39am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F10 "2023-04-05T03:39:44Z")

</div>

I also faced the same issue, and the issue is caused by [transformers/configuration\_utils.py at main · huggingface/transformers · GitHub](https://github.com/huggingface/transformers/blob/main/src/transformers/generation/configuration_utils.py#L575)

Comment that part the issue should be solved.

---

<div class="post-metadata">

**Author:** ![Mohamad-Jaallouk](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@Mohamad-Jaallouk](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMohamad-Jaallouk)%5C
**Post date:** [December 20, 2023, 8:06pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F11 "2023-12-20T20:06:09Z")

</div>

import wandb  
wandb.init(mode=“disabled”)

---

<div class="post-metadata">

**Author:** ![pratt3000](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/pratt3000/32/24673_2.png) [@pratt3000](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fpratt3000)%5C
**Post date:** [March 9, 2024, 8:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F12 "2024-03-09T08:37:35Z")

</div>

Thanks! This is so weird. I was banging my head on it for too long lol.

---

<div class="post-metadata">

**Author:** ![letao670982](https://avatars.discourse-cdn.com/v4/letter/l/ba9def/32.png) [@letao670982](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fletao670982)%5C
**Post date:** [July 13, 2024, 2:08am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F13 "2024-07-13T02:08:17Z")

</div>

This method is productive in kaggle. Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [September 27, 2024, 7:32am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-turn-wandb-off-in-trainer%2F6237%2F14 "2024-09-27T07:32:11Z")

</div>

Closed on September 27, 2024, 7:32am UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
