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

Change function name HMASynthesizer.update_table_parameters --> set_table_parameters #1200

Closed
npatki opened this issue Jan 27, 2023 · 0 comments
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@npatki
Copy link
Contributor

npatki commented Jan 27, 2023

Problem Description

Currently, the method to reset the table parameters is named HMASynthesizer.update_table_parameters.

This does not accurately reflect the functionality:

  1. If I am updating parameters, I would expect that any partial changes override the original values but the rest remain
  2. If I am setting parameters, I would expect that all the parameters are getting reset

From looking at the functionality, it appears that we are in the 2nd scenario. So the method is not actually updating, but setting.

Expected behavior

Change the method name to: HMASynthesizer.set_table_parameters

Additional context

Try running the following code:

s = HMASynthesizer(metadata)
s.update_table_parameters(
    table_name='users',
    table_parameters={
        'enforce_min_max_values': False,
        'numerical_distributions': {
            'A': 'gamma',
            'B': 'beta' }})

s.update_table_parameters(
    table_name='users',
    table_parameters={
        'numerical_distributions': {
            'A': 'uniform'}})

Observe that the end state is:

  • enforce_min_max_values=True and
  • A='uniform'

This means that the second call for update_table_parameters completely overrides the first -- i.e. this is (re)setting parameters not updating them.

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

No branches or pull requests

3 participants