Skip to content

Visualization functions are resulting in a FutureWarning #2935

Description

@npatki

Environment Details

  • SDV version: 1.37.4

Error Description

Whenever I use the visualizations functions listed in this page, I see many FutureWarnings that are printed out. The warnings don't really make sense because I'm not trying to actually run any reports -- I'm just trying to visualize the data.

Steps to reproduce

First install SDV community.

pip install sdv

Then run the following code in Python:

from sdv.datasets.demo import download_demo
from sdv.evaluation.multi_table import get_column_plot

data, metadata = download_demo(
    modality='multi_table',
    dataset_name='fake_hotels')

fig = get_column_plot(
    real_data=data,
    synthetic_data=None,
    metadata=metadata,
    table_name='guests',
    column_name='amenities_fee'
)
    
fig.show()

Output:

/usr/local/lib/python3.12/dist-packages/sdv/evaluation/multi_table.py:6: FutureWarning: The multi table diagnostic report is deprecated. Please use the DiagnosticReport from 'sdmetrics.reports' instead.
  from sdmetrics.reports.multi_table.diagnostic_report import DiagnosticReport
/usr/local/lib/python3.12/dist-packages/sdv/evaluation/multi_table.py:7: FutureWarning: The multi table quality report is deprecated. Please use the QualityReport from 'sdmetrics.reports' instead.
  from sdmetrics.reports.multi_table.quality_report import QualityReport
/usr/local/lib/python3.12/dist-packages/sdv/evaluation/single_table.py:6: FutureWarning: The single table diagnostic report is deprecated. Please use the DiagnosticReport from 'sdmetrics.reports' instead.
  from sdmetrics.reports.single_table.diagnostic_report import DiagnosticReport
/usr/local/lib/python3.12/dist-packages/sdv/evaluation/single_table.py:7: FutureWarning: The single table quality report is deprecated. Please use the QualityReport from 'sdmetrics.reports' instead.
  from sdmetrics.reports.single_table.quality_report import QualityReport

Additional Context

It appears there's a blanket warning on anything from the sdv.evaluation.single_table and sdv.evaluation.multi_table modules, which isn't right. Only the run_diagnostic and evaluate_quality functions from these pathways should result in a FutureWarning.

Other functions inside these modules (such as the visualization utilities) still use this pathway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions