quantlab.tracking.wandb.WandbTracker#
- class quantlab.tracking.wandb.WandbTracker(*, project=None, entity=None, mode='online')[source]#
Bases:
TrackerSend tracking runs to Weights & Biases.
- Attributes:
- projectstr, optional
The W&B project every run goes to;
Nonekeeps the caller’s default.- entitystr, optional
The W&B team or user owning the project;
Noneuses the account’s default entity.- mode{“online”, “offline”, “disabled”}
"online"syncs as it runs,"offline"writes the run underwandb/for a laterwandb sync(WANDB_DIRmoves it), and"disabled"records nothing.
- Raises:
- ValueError
If
modeis 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