quantlab.tracking.wandb.WandbTracker#

class quantlab.tracking.wandb.WandbTracker(*, project=None, entity=None, mode='online')[source]#

Bases: Tracker

Send tracking runs to Weights & Biases.

Attributes:
projectstr, optional

The W&B project every run goes to; None keeps the caller’s default.

entitystr, optional

The W&B team or user owning the project; None uses the account’s default entity.

mode{“online”, “offline”, “disabled”}

"online" syncs as it runs, "offline" writes the run under wandb/ for a later wandb sync (WANDB_DIR moves it), and "disabled" records nothing.

Raises:
ValueError

If mode is not one of the three modes.

Examples

>>> tracker = WandbTracker(project="momentum_research", mode="disabled")
>>> tracker.get_config()
{'project': 'momentum_research', 'entity': None, 'mode': 'disabled', 'name': 'quantlab.tracking.wandb.WandbTracker'}
>>> with tracker.start_run(
...     project="XGBoostRegressor", group="XGBoostRegressor_trial_1", name="XGBoostRegressor_total", config={}
... ) as run:
...     run.log({"val_rmse": 0.02}, step=0)
config_cls#

alias of WandbTracker