-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
bugSomething isn't workingSomething isn't workingnewLabel applied to new issuesLabel applied to new issues
Description
Environment Details
Please indicate the following details about the environment in which you found the bug:
- SDMetrics version: 0.24.0
- Python version: 3.10.19
- Operating System: macos 14.6.1
Error Description
I want to make my plotly figures in PNG format, using fig.show(render='png') or
import plotly.io as pio
pio.renderers.default = 'png'However, my plots are still using iframe renderer.
Steps to reproduce
from sdv.evaluation.single_table import get_column_plot
fig = get_column_plot(
real_data=real_data,
synthetic_data=synthetic_data,
column_name='room_rate',
metadata=metadata
)
fig.show(render='png')
produced plot is in iframe format instead of being a static png image
Additional context
This issue is probably related to how sdmetrics always makes the default renderer as iframe when we are using an ipython interactive shell.
SDMetrics/sdmetrics/visualization.py
Lines 33 to 35 in 36c7695
| if 'ZMQInteractiveShell' in ipython_interpreter and 'iframe' in renderers: | |
| # This means we are using jupyter notebook | |
| pio.renderers.default = 'iframe' |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingnewLabel applied to new issuesLabel applied to new issues