Do environment variables overwrite the parameters passed to wandb.init()?
Arguments passed to wandb.init override environment variables. To set a default directory other than the system default when the environment variable isn't set, use wandb.init(dir=os.getenv("WANDBDIR", mydefault_override)).
How do I handle the 'Failed to query for notebook' error?
If you encounter the error message "Failed to query for notebook name, you can set it manually with the WANDBNOTEBOOKNAME environment variable," resolve it by setting the environment variable. Multiple methods accomplish this:
How do I silence W&B info messages?
To turn off standard Weights & Biases logging and information messages, such as project info at the start of a run, set the WANDB_SILENT environment variable. This must occur in a notebook cell before running wandb.login:
How do I stop wandb from writing to my terminal or my jupyter notebook output?
Set the environment variable WANDB_SILENT to true.
How do I switch between accounts on the same machine?
To manage two W&B accounts from the same machine, store both API keys in a file. Use the following code in your repositories to switch between keys securely, preventing secret keys from being checked into source control.
How does wandb stream logs and writes to disk?
W&B queues events in memory and writes them to disk asynchronously to manage failures and support the WANDB_MODE=offline configuration, allowing synchronization after logging.
Is it possible to save metrics offline and sync them to W&B later?
By default, wandb.init starts a process that syncs metrics in real time to the cloud. For offline use, set two environment variables to enable offline mode and sync later.
What does wandb.init do to my training process?
When wandb.init() runs in a training script, an API call creates a run object on the servers. A new process starts to stream and collect metrics, allowing the primary process to function normally. The script writes to local files while the separate process streams data to the servers, including system metrics. To turn off streaming, run wandb off from the training directory or set the WANDB_MODE environment variable to offline.
What happens if internet connection is lost while I'm training a model?
If the library cannot connect to the internet, it enters a retry loop and continues to attempt to stream metrics until the network is restored. The program continues to run during this time.