Files
drift/wandb_setup.py
T
Daniel Szemerey a7414eac23 feature: Added Weights and Biases configuration to the repo. (#48)
* feat: initial wandb configured. Sweep parameters aren't configured yet.

* feat: Wandb logs now results.

* feat: gitignore.

* fix: Took out print()

* feat: Changed default value of wandb to False.

* feat: Added wandb to turn of automatically if there is no environment variable to start it (when we push it). Added environment configuration aswell.

* fix(Dependencies): the package name seems to be python-dotenv

Co-authored-by: Mark Aron Szulyovszky <mark.szulyovszky@gmail.com>
2021-12-20 14:01:14 +01:00

18 lines
328 B
Python

import wandb
import os
def get_wandb():
from dotenv import load_dotenv
load_dotenv()
''' 0. Login to Weights and Biases '''
wsb_token = os.environ.get('WANDB_API_KEY')
if wsb_token:
wandb.login(key=wsb_token)
return wandb
else: return None #wandb.login()
# return wandb