new update affects px.scatter() logging in wandb
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
hi,
I noticed that updating to plotly=6.0.1 breaks some of the wandb logging of scatterplots, at least those with hover features. I think this might have something to do with some change in the json encoding given by the plotly.io codebase.
minimum reproducing error:
import plotly.express as px
import pandas as pd
import wandb
table_ex = pd.DataFrame({"ax1": [0, 3, 4],
"ax2": [0, 3, 3],
"ax3": [0, 0.2, 0.4],
}
)
fig2 = px.scatter(table_ex, x="ax1", y ="ax2", color="ax3", range_color=(0,1), hover_data=table_ex.columns)
fig2.update_traces(marker=dict(size=15))
fig2
run = wandb.init(project="test2")
wandb.log({"hi": fig2})
wandb.finish()
wandb==0.19.8, plotly==6.0.1, pandas==2.2.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the provided reproducer with wandb==0.19.8, plotly==6.0.1, and pandas==2.2.3, focusing on the px.scatter figure with hover_data. Trace the serialization used when wandb.log receives the figure and compare it with the behavior before the Plotly update. Done means scatterplots with hover features log successfully again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100