# Many logged in messages

**URL:** <https://community.wandb.ai/t/many-logged-in-messages/5264>\
**Category:** W&B Help\
**Tags:** wandb\
**Created:** [October 24, 2023, 9:54am UTC](https://community.wandb.ai/t/many-logged-in-messages/5264 "2023-10-24T09:54:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jobdvogel](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@jobdvogel](https://community.wandb.ai/u/jobdvogel)\
**Post date:** [October 24, 2023, 9:54am UTC](https://community.wandb.ai/t/many-logged-in-messages/5264/1 "2023-10-24T09:54:08Z")

</div>

Hi,

I am currently using:

- Visual Studio Code
- Python 3.8.17
- Pytorch 2.0.1
- Wandb 0.15.12

I am using a script similar to the Jupyter Notebook example: Simple\_PyTorch\_Integration.ipynb. However, I am running my script directly as Python file, not as notebook. In my pipeline loop, I get messages that I am logged in every few iterations. Could someone explain and is there a way to turn this off?

e.g.

> **Summary**
>
> ```auto
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> 0%| | 0/5 [00:00<?, ?it/s]Start training epoch 0 with 10 batches...
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> [Epoch 0: it00000/10] train loss: 0.322444
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> [Epoch0: it00000/0] test loss: 0.126046
> [Epoch 0: it00002/10] train loss: 0.483436
> [Epoch 0: it00004/10] train loss: 0.306451
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> [Epoch0: it00005/0] test loss: 0.183672
> [Epoch 0: it00006/10] train loss: 0.214047
> [Epoch 0: it00008/10] train loss: 0.208517
> 20%|██████████████████████████████████████ | 1/5 [01:16<05:05, 76.50s/it]Start training epoch 1 with 10 batches...
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> wandb: Currently logged in as: jobdvogel. Use `wandb login --relogin` to force relogin
> 
> ```

Thank you for your time!

---

<div class="post-metadata">

**Author:** ![jobdvogel](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@jobdvogel](https://community.wandb.ai/u/jobdvogel)\
**Post date:** [October 24, 2023, 2:54pm UTC](https://community.wandb.ai/t/many-logged-in-messages/5264/2 "2023-10-24T14:54:20Z")

</div>

It seems to be caused by my train and test loader being called. Since my loaders are using 4 cpu’s this line is called 4 times. This message seems to be sent when my loader is called.

---

<div class="post-metadata">

**Author:** ![mohammadbakir](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@mohammadbakir](https://community.wandb.ai/u/mohammadbakir)\
**Post date:** [October 30, 2023, 4:17pm UTC](https://community.wandb.ai/t/many-logged-in-messages/5264/3 "2023-10-30T16:17:41Z")

</div>

Hi @jobdvogel , happy to help. Could you please provide the script you are executing a simple toy example to help us reproduce this. Thanks

---

<div class="post-metadata">

**Author:** ![joana-marie](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@joana-marie](https://community.wandb.ai/u/joana-marie)\
**Post date:** [November 6, 2023, 9:47am UTC](https://community.wandb.ai/t/many-logged-in-messages/5264/4 "2023-11-06T09:47:45Z")

</div>

Hi @jobdvogel ,

We would like to follow up on our previous request to please share a toy example of the code you are using for us to reproduce the case you have.

Thank you.

---

<div class="post-metadata">

**Author:** ![jobdvogel](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@jobdvogel](https://community.wandb.ai/u/jobdvogel)\
**Post date:** [November 6, 2023, 12:48pm UTC](https://community.wandb.ai/t/many-logged-in-messages/5264/5 "2023-11-06T12:48:37Z")

</div>

Hi, I will try to make one upcoming days, and share it with you asap!

---

<div class="post-metadata">

**Author:** ![jobdvogel](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@jobdvogel](https://community.wandb.ai/u/jobdvogel)\
**Post date:** [November 6, 2023, 1:32pm UTC](https://community.wandb.ai/t/many-logged-in-messages/5264/6 "2023-11-06T13:32:13Z")

</div>

After making a toy example I found the solution to this problem. Similarly to how the example colab was built, I used the `wandb.login()` statement outside an `if __name__ == ' __main__'` function. Since my dataloader is using multiple cpu cores, I think the `wandb.login()` statement is called every time the loader is generating a new batch.

When I put it inside the loop like this, the problem was resolved:

```auto
if __name__ == ' __main__':
   wandb.login()
   pipeline()

```

For reference, my dataloader:

```auto
dataloader = torch.utils.data.DataLoader(
        dataset,
        batch_size=batch_size,
        shuffle=True,
        num_workers=4,
        pin_memory=True
        )

```

Thank you for your time!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [January 5, 2024, 1:32pm UTC](https://community.wandb.ai/t/many-logged-in-messages/5264/7 "2024-01-05T13:32:28Z")

</div>

Closed on January 5, 2024, 1:32pm UTC

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