Hi!
So I’m logging histograms right now to wandb as:
wandb.log({"histogram": wandb.Histogram(float_column.values)})
But when i inspect the histogram in the dashboard/panel for the run its not shown as a histogram. But If i hover over chart then a preview of the histogram becomes available!
Same happens even if i log as:
wandb.log({"float_column": wandb.Histogram(np_histogram=np.histogram(float_column, bins=100))})
Am I logging wrongly the histogram? What should i do so the preview that i get while hovering becomes the main chart in the dashboard/panel?
Thanks!
Hello @jaimefh , thank you for writing in and happy to help. Have you tried resetting your workspace and what would be the outcome?
Hi! Yeah I’ve tried that and they still display as the weird bard charts
Hello @jaimefh is it possible to share your run/workspace link for us to check? Thanks
Yes, you could check on this run Weights & Biases
Based on the information provided, it seems you’re logging the histogram correctly. Let’s break down what’s happening and provide some clarification:
-
Logging method:
Your code wandb.log({"histogram": wandb.Histogram(float_column.values)})
is the correct way to log a histogram to Weights & Biases.
-
Dashboard display:
When you say “it’s not shown as a histogram” in the dashboard, this is actually expected behavior. In the W&B UI, histograms are typically displayed as heatmaps over time, not as traditional bar-style histograms.
-
Hover preview:
The fact that you can see a preview of the histogram when you hover over the chart is also normal and intended functionality.
This behavior is described in the documentation you provided:
“If histograms are in your history, we plot a heatmap of bins over time on the Charts tab.”
The heatmap representation allows you to see how the distribution changes over time (across steps or epochs). Each column in the heatmap represents a histogram at a particular step, with color intensity indicating the frequency of values in each bin.
If you want to see a traditional histogram view:
- You can use the hover preview as you’ve discovered.
- If you want a static histogram view, you could log it to the summary instead:
python wandb.run.summary.update({"final_histogram": wandb.Histogram(float_column.values)})
This would make it appear on the Overview tab as a regular histogram.
To summarize, you’re logging the histogram correctly. The display you’re seeing (heatmap with hover preview) is the intended behavior for histograms logged to the history in W&B. If you need a different visualization, you might consider using a custom plot or logging to the summary instead.
Hi Jaime,
We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.
Best,
Weights & Biases
Hi Jaime, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!
hi sorry! Missed nofitications about this. Still facing the issue but will try your suggested changes and get back. I do want the histogram to be the default view and not from over.
Thanks for the help!