question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue logging seaborn / plt plot via wandb.log()

See original GitHub issue

Describe the bug

When I attempt to log a seaborn scatterplot to weights and biases I get the following error:

*** AttributeError: 'XAxis' object has no attribute '_gridOnMajor'

To Reproduce

tips = sns.load_dataset("tips")
fig, ax = plt.subplots(figsize=(11.7, 8.27))
sns.scatterplot(data=tips, x="total_bill", y="tip")
wandb.log({"test_plot": fig})
# or
wandb.log({"test_plot": plt})

Expected behavior

Logging the plot to wandb interface in plotly format

Operating System

  • OS: MacOS
  • Browser: Chrome

Additional context This seems to be happening with the example given here too.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
abcde-1447commented, Jul 9, 2021

@chanmi168 FYI I fixed this issue with following versions:

matplotlib == ‘3.3.3’ plotly == ‘5.1.0’

Hope it helps.

1reaction
harritaylorcommented, Dec 16, 2020

@ariG23498 thanks for getting back to me, apologies I didn’t reply sooner - I only got back to work today. I think it was something to do with my environment – with a fresh conda env it works fine. Sorry!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue logging seaborn / plt plot via wandb.log() #1608
Describe the bug When I attempt to log a seaborn scatterplot to weights and biases I get the following error: *** AttributeError: 'XAxis' ......
Read more >
Log Plots - Documentation - Weights & Biases - Wandb
Log informative charts throughout training, including precision-recall and ROC curves and custom charts.
Read more >
How does one save a plot in wandb with wandb.log?
After importing your wandb and logging in / authenticating, try executing the Log Plots cell and then clicking on the link to your ......
Read more >
I.CommonLit: Explore + XGBRF&RepeatedFold Model
This one looks simple in terms of understanding the problem, goal and competition ... Note: If this line throws an error, try using...
Read more >
MLOps Basics [Week 1]: Model Monitoring - Weights and Bias
In this post, I will be going through the following topics: How to configure basic logging with W&B? How to compute metrics and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found