Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running single table report on multi table data (or vice versa) results in confusing error #510

Closed
frances-h opened this issue Nov 9, 2023 · 0 comments · Fixed by #499
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@frances-h
Copy link
Contributor

Environment Details

Please indicate the following details about the environment in which you found the bug:

  • SDMetrics version:
  • Python version:
  • Operating System:

Error Description

When running a multi-table report on single table data, the report fails with the following error: AttributeError: 'dict' object has no attribute 'columns'. The single table report should error with a clear message if it is called with multi-table data. The multi-table report should also error with a clear message if it is called with single-table data:
ValueError: Single table {report type} called with multi table data, please use multi-table {report type} instead.
ValueError: Multi table {report type} called with single table data, please use single table {report type} instead.

Steps to reproduce

from sdmetrics.reports.single_table import DiagnosticReport

multi_data, multi_meta = download_demo('multi_table', 'Accidents_v1')

DiagnosticReport().generate(multi_data, multi_data, multi_meta.to_dict())
@frances-h frances-h added bug Something isn't working new Label applied to new issues labels Nov 9, 2023
@npatki npatki removed the new Label applied to new issues label Nov 13, 2023
@amontanez24 amontanez24 added this to the 0.13.0 milestone Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants