[Bug-App]: Exported PNG hides continuous zero-valued segments (horizontal line at 0 disappears) · Issue #9994 · wandb/wandb · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a tracked metric (e.g., eval/success_once) remains exactly 0 for many consecutive steps, the WandB web UI correctly displays a thin horizontal line at Y=0. However, clicking Download PNG produces an image where that entire zero-valued segment is effectively “invisible” (it is compressed into the bottom of the plot or cropped out entirely), giving the impression that the curve abruptly ends rather than remaining at 0. This can confuse users into thinking their metric has stopped logging or that data is missing.
Steps to Reproduce:
Create a simple WandB run that logs a nonzero value for a while, then logs 0 continuously. For example:
In the WandB web interface, open the run and observe the plotted line:
From step 0 to 30 million, eval/success_once oscillates around 1.0 (or remains at 1.0 in this example).
After step 30 million, the metric is logged as 0.0 for all subsequent steps.
You will see a thin horizontal line “stuck” at Y=0 in the browser chart.
Click the Download PNG button in the top-right corner of the chart.
Open the downloaded PNG file. Notice that the zero-valued segment is either compressed against the x-axis or not visible at all; it looks as if the curve abruptly disappeared at step 30 million rather than remaining at 0.
Expected Behavior:
The exported PNG should retain a visible horizontal line at Y=0 for all steps where the metric is exactly 0.
Ideally, WandB would automatically leave a small bottom‐margin (e.g., extend the y-axis lower bound slightly below 0) when it detects a long constant segment at 0, so that users can still see that the metric is holding at zero.
Alternatively, an option in the chart editor (e.g., “Always display zero baseline”) could ensure that a flat line at 0 is never cropped out in the exported image.
Actual Behavior:
In the web UI, the flat zero segment is visible (it is drawn as a thin line at Y=0).
In the downloaded PNG, that same segment is essentially “invisible” (compressed onto the x-axis or clipped), making it appear as if the metric disappeared instead of staying at zero.
Screenshots:
Web UI view (zero segment visible):
In the browser, you can see a thin line at Y=0 for steps > 30 million.
Exported PNG (zero segment hidden):
In the downloaded PNG, the flat line at Y=0 is not visible or is merged with the axis.
Environment:
Browser: Chrome 114.0.5735.199 (Ubuntu 20.04)
Operating System: Ubuntu 20.04 LTS
Additional Context:
This issue can mislead new users into thinking that their metric has stopped logging once it reaches 0, since the chart appears to “end.”
In many reinforcement‐learning environments or evaluation runs, a metric can plateau at 0 (e.g., “success rate” for an untrained policy). If the baseline disappears, it can cause confusion, especially when inspecting long training runs.
If WandB could detect “long constant segments” and automatically pad the y-axis by a small fraction (e.g., 5 pixels or 5% below the minimum value), that would solve the problem without requiring manual intervention.
Alternatively, adding a simple option in the chart editor like “Always show zero line” or “Include constant baselines” would allow users to opt in to preserving these flat 0 segments in their exports.
Thank you for considering this enhancement/bug fix. If you need any more details (e.g., a minimal reproduction script or raw CSV data), please let me know!
The text was updated successfully, but these errors were encountered:
Hi @songyuc , thank you for raising this issue and providing all the details to reproduce on our end - I will raise this with our engineering team and will keep you posted.
In the meantime, as a workaround, you could manually set the y-axis Min to a value lower than 0, and the line will display in the exported png:
On a side note, to make sure performance on your workspaces is not impacted I would suggest reducing the logging frequency for you metrics, as following our recommendations we suggest not to log more than 100k steps per metric (see here) and while this is not a hard-limit, having ~50M steps per metric could impact the workspace performance.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
When a tracked metric (e.g.,
eval/success_once
) remains exactly 0 for many consecutive steps, the WandB web UI correctly displays a thin horizontal line at Y=0. However, clicking Download PNG produces an image where that entire zero-valued segment is effectively “invisible” (it is compressed into the bottom of the plot or cropped out entirely), giving the impression that the curve abruptly ends rather than remaining at 0. This can confuse users into thinking their metric has stopped logging or that data is missing.Steps to Reproduce:
Create a simple WandB run that logs a nonzero value for a while, then logs 0 continuously. For example:
In the WandB web interface, open the run and observe the plotted line:
eval/success_once
oscillates around 1.0 (or remains at 1.0 in this example).You will see a thin horizontal line “stuck” at Y=0 in the browser chart.
Click the Download PNG button in the top-right corner of the chart.
Open the downloaded PNG file. Notice that the zero-valued segment is either compressed against the x-axis or not visible at all; it looks as if the curve abruptly disappeared at step 30 million rather than remaining at 0.
Expected Behavior:
Actual Behavior:
Screenshots:
In the browser, you can see a thin line at Y=0 for steps > 30 million.
In the downloaded PNG, the flat line at Y=0 is not visible or is merged with the axis.
Environment:
Additional Context:
Thank you for considering this enhancement/bug fix. If you need any more details (e.g., a minimal reproduction script or raw CSV data), please let me know!
The text was updated successfully, but these errors were encountered: