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

Passing None as synthesizers runs all of them #233

Closed
amontanez24 opened this issue May 24, 2023 · 2 comments · Fixed by #237
Closed

Passing None as synthesizers runs all of them #233

amontanez24 opened this issue May 24, 2023 · 2 comments · Fixed by #237
Assignees
Labels
bug Something isn't working
Milestone

Comments

@amontanez24
Copy link
Contributor

amontanez24 commented May 24, 2023

Environment Details

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

  • SDGym version: master
  • Python version: Any
  • Operating System: Any

Error Description

If you pass an empty list or None for synthesizers into the benchmark_single_table function it runs all of the synthesizers. This is undesirable because sometimes you only want to run custom synthesizers. Instead of defaulting to all when synthesizers is None, we should just treat it as None.

Steps to reproduce

from sdgym import benchmark_single_table

benchmark_single_table(
    synthesizers=None,
    custom_synthesizers=[TestSynthesizer],
    sdv_datasets=['student_placements']
)
@amontanez24 amontanez24 added the bug Something isn't working label May 24, 2023
@amontanez24 amontanez24 added this to the 0.7.0 milestone May 24, 2023
@amontanez24
Copy link
Contributor Author

@npatki What should happen if the user passes None for both synthesizers and custom_synthesizers?

@npatki
Copy link

npatki commented May 24, 2023

@amontanez24 in this case, I suppose we can just return an empty DataFrame, as there is nothing to run.

Also, I think the empty list should be treated the same way as None:

from sdgym import benchmark_single_table

benchmark_single_table(
    synthesizers=[],
    custom_synthesizers=[TestSynthesizer],
    sdv_datasets=['student_placements']
)

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.

3 participants