[feat] Integrating W&B Tables for Prediction Visualization #1154
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Hey all, this PR adds a little feature on top of the
WandbLogger
that I have improved/extended in this PR, #1137. The PR adds the prediction report generated whenevaluation.predict=true
as W&B Tables.What is W&B Tables?
It's an interactive way of going through your dataset and model prediction. It is a two dimensional grid of data where each column has a single type of data—think of this as a more powerful DataFrame. Tables support primitive and numeric types, as well as nested lists, dictionaries, and rich media types. Log a Table to W&B, then query, compare, and analyze results in the UI.
(Source)
Modification
This PR adds a
log_prediction_report
to theWandbLogger
. This method is called in thetrainer/core/evaluation_loop.py
file (a 2-3 line addition).Usage
To use this, in the
config/defaults.yaml
do,training.wandb.enabled=true
,training.wandb.log_tables=true
andevaluation.predict=true
.Result
Here's the Tables page that you can check out.
Superpowers
One can now keep track of the model prediction result. I found keeping track of the same using
json
orcsv
challenging especially when I am revisiting the project after few days.What more can be done?
So far all good, but W&B Tables has a lot to offer. We can log the actual input question and image instead of
question_id
andimage_id
. Any help in this direction would be useful.Future additions/improvement
Here's a crude road map for this feature.
The following is how I see it progressing, which might change in the future.
I would love to know if you are interested in this. :D