Weight & Biases support
See original GitHub issue🚀 Feature
Adding support for wandb library
Motivation
W&B is one of the most advanced and feature-rich experiment tracking tools. It would be great to have support in detectron2. Great example: https://app.wandb.ai/syllogismos/keras-retinanet
Pitch
I implemented it in my own project as wanbb_writer.py
module
import wandb
from detectron2.utils.events import (
EventWriter,
get_event_storage,
)
class WAndBWriter(EventWriter):
"""
Write all scalars to a wandb tool.
"""
def __init__(self, window_size: int = 20):
self._window_size = window_size
def write(self):
storage = get_event_storage()
for k, v in storage.latest_with_smoothing_hint(self._window_size).items():
wandb.log({f"{k}": v}, step=storage.iter)
if len(storage.vis_data) >= 1:
for img_name, img, step_num in storage.vis_data:
self._writer.add_image(img_name, img, step_num)
storage.clear_images()
def close(self):
pass
and add this class as one of the writer
here
https://github.com/facebookresearch/detectron2/blob/master/tools/plain_train_net.py#L136
If someone finds this feature useful as I do, I would be happy to send a PR with W&B writer and tests for it.
cc: @cvphelps
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:8
Top Results From Across the Web
Weights & Biases – Developer tools for ML
Our mission is to build the best tools for machine learning. Use W&B for experiment tracking, dataset versioning, and collaborating on ML projects....
Read more >Stop Weight Bias
With your help, we can build a better world, free of weight bias, where everyone is treated with dignity and respect. The time...
Read more >Weight Bias - Obesity Action Coalition
Weight bias is negative attitudes, beliefs, judgments, stereotypes, and discriminatory acts aimed at individuals simply because of their weight. It can be overt ......
Read more >Weight bias and support of public health policies - PubMed
A higher total explicit weight bias score increased the odds of supporting primarily less intrusive policies. However, dislike of individuals ...
Read more >How to Address Weight Bias and Weight Discrimination
People who are overweight or obese may be unfairly stereotyped as lazy, overindulgent and undisciplined, said Michelle Smith, a social worker who specializes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I suppose wandb will be enabled by just adding
import wandb; wandb.init(sync_tensorboard=True)
to your code. It doesn’t look like we need to do anything for it.AP curves will be available if you set
TEST.EVAL_PERIOD
.Probably something has changes meanwhile, but the example of @truskovskiyk doesn’t work for me. Below is my adaptation, which works with v0.3. I’ve noticed W&B has issues with
/
in the metric names.