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

Make the get_parameters function consistent between synthesizers #1756

Closed
npatki opened this issue Jan 24, 2024 · 0 comments · Fixed by #1825
Closed

Make the get_parameters function consistent between synthesizers #1756

npatki opened this issue Jan 24, 2024 · 0 comments · Fixed by #1825
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@npatki
Copy link
Contributor

npatki commented Jan 24, 2024

Problem Description

Currently, almost all synthesizers have a method called get_parameters and there is some inconsistency between what is returned here. Let's align the return value of this function to the overall synthesizer representation.

Expected behavior

The parameters of a synthesizer are the optional input values during instantiation, excluding items such as the metadata, constraints, preprocessing, or individual table-level synthesizers.

  1. For all synthesizers: The get_parameters call should include all optional settings during instantiation. They should include all of the optional settings.
    • If a user inputted them, include the user-inputted value
    • If a user did not input a setting, include the default value
  2. Add the get_parameters call to the SingleTablePreset (with parameters 'name' and 'locales')
  3. For multi-table synthesizer, only include the top-level parameters for the multi-table algorithm
    • Same a (1), include all settings during instantiation, even the default ones
    • Do not include the 'tables' dictionary. We will re-establish a different call to get these values.
  4. Make an exception for the single table DayZSynthesizer: This synthesizer should continue to include the 'columns' dictionary with instructions for how to make each column -- including default values.

Additional Context

>>> synth = HSASynthesizer(metadata, locales=['en_US', 'en_GB'])
>>> synth.get_parameters()
{
  'locales': ['en_US', 'en_GB'],
  'default_num_clusters': 3 # default
}

>>> synth = DayZSynthesizer(metadata)
>>> synth.add_numerical_bounds(column_name='age', min_value=18, max_value=100)
>>> synth.get_parameters()
{
  'locales': ['en_US'] # default,
  'columns': {
    'age': {
      'min_value': 18,
      'max_value': 100
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants