# Run name issue, different run name file in webpage & local

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Frun-name-issue-different-run-name-file-in-webpage-local%2F97354%3E%5C
**Category:** 🤗Transformers\
**Created:** [July 15, 2024, 5:50am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Frun-name-issue-different-run-name-file-in-webpage-local%2F97354 "2024-07-15T05:50:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeeLi4704](https://avatars.discourse-cdn.com/v4/letter/l/58956e/32.png) [@LeeLi4704](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FLeeLi4704)%5C
**Post date:** [July 15, 2024, 5:50am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Frun-name-issue-different-run-name-file-in-webpage-local%2F97354%2F1 "2024-07-15T05:50:32Z")

</div>

When using wandb lib within huggingface lib, I assign the runname in the running script and wandb create a run in the webpage according to the name, but when the code also create a randomly named file in the local and the code would try to open the local file. What should I do to align the both?

---

<div class="post-metadata">

**Author:** ![DasLlamaLama](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/dasllamalama/32/57285_2.png) [@DasLlamaLama](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FDasLlamaLama)%5C
**Post date:** [January 16, 2026, 9:28am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Frun-name-issue-different-run-name-file-in-webpage-local%2F97354%2F2 "2026-01-16T09:28:31Z")

</div>

#### Your setup

Your `wandb.init()` setup creates an empty log name at the beginning. After renaming it, it will show as the new name in the script log output, while the name at `wandb.finish()` time was alright anyway.

```auto
wandb.init() # → random log output name
# ...
wandb.run.name = MYLOGNAME
# ...
wandb.finish() # → right log output name

```

#### Needed setup

You need to start with `wandb.init(name=MYLOGNAME)` to avoid the random name in the output of the script. I guess wandb logs also write to a directory in the wandb logs at the time of wandb.init(). By assigning the name at the beginning, you do not need to write `wandb.run.name = MYLOGNAME` afterwards anymore.

```auto
init(name=MYLOGNAME) # → right log output name (no worries, no empty run will pop up in Weights & Biases frontend unless you pass more parameters)
# ...
wandb.finish() # → right log output name

```

#### Avoid an empty run from `wandb.init(…)`

Mind that you might create an empty run in the Weights & Biases frontend. If you also pass `project`, `entity` and `name` at `wandb.init()`time, you will see a needless empty run in the wandb frontend.
