question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

wandb init hasn't been called

See original GitHub issue
  • Weights and Biases version: 0.8.10
  • Python version: 3.7.4
  • Operating System: Windows

Description

Trying to launch training code in pytorch. Launching code as recommended with wandb run python train.py I have a wandb.init(...) at the begining of my code.

This code works perfectly fine on linux.

What I Did

Put all my code in a if __name__ == "__main__" because windows needs it to launch processes : No success

wandb run python train.py 

wandb: ERROR wandb.init hasn't been called, can't configure run
Traceback (most recent call last):
  File "train.py", line 164, in <module>
    wandb.save(PATH_WEIGHTS_EMBEDDER)
  File "C:\Users\pisne\AppData\Local\Continuum\anaconda3\lib\site-packages\wandb\__init__.py", line 493, in save
    os.symlink(abs_path, wandb_path)
OSError: symbolic link privilege not held
wandb: Program failed with code 1. Press ctrl-c to abort syncing.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
noklamcommented, Aug 6, 2020

@noklam Please do not use wandb run any more (This command will likely be removed in future releases)

Example python:

import wandb
def train():
    wandb.init()
    wandb.log(dict(metric=value))
if __name__ == "__main__":
  train()

Then run with: python train.py

ops sorry, I came in this issue as I hit the os.symbolic link issue on Window.

in my case, it is due to wandb.save()

2reactions
ierezellcommented, Sep 19, 2019

@alberduris I know it’s only a patch but you can use Popen from subprocesses in python to automate launching commands with arguments…

@raubitsj Thanks a lot for the precisions. I’m a linux power user and the unix wandb is amazing but unfornutaltely my lab granted me acces to a really powerfull Gpu… on windows…

I wanted the name of my run to be linked to parameters (like Arch_8_0.0001 etc…) which is good under linux but I will try on windows with os.environ and tell here my successes.

Thanks again for the fast and precise feedback !

Read more comments on GitHub >

github_iconTop Results From Across the Web

wandb init hasn't been called · Issue #557 - GitHub
No matter what, when the model starts running always throw the warning that "wandb init hasn't been called" which makes impossible to correctly ......
Read more >
Launch Experiments with wandb.init - Documentation
Call wandb.init() once at the beginning of your script to initialize a new job. This creates a new run in W&B and launches...
Read more >
wandb.Run - Documentation - Weights & Biases
Returns the name of the W&B entity associated with the run. ... i.e. username/project_name/run_id if wandb.init has not been called, this is required....
Read more >
Environment Variables - Documentation - Weights & Biases
WANDB_ENTITY. The entity associated with your run. If you have run wandb init in the directory of your training script, it will create...
Read more >
wandb.init - Documentation - Weights & Biases
Call wandb.init() to start a run before logging data with wandb.log() : import wandb ... This helps you remember what you were doing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found