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

Move progress bar out of base multi table synthesizer #1495

Merged
merged 5 commits into from
Jul 10, 2023

Conversation

R-Palazzo
Copy link
Contributor

Resolve #1486

@R-Palazzo R-Palazzo requested a review from a team as a code owner July 7, 2023 10:10
@R-Palazzo R-Palazzo requested review from fealho, amontanez24 and a team and removed request for a team July 7, 2023 10:10
@codecov-commenter
Copy link

codecov-commenter commented Jul 7, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (750332c) 96.28% compared to head (b97ffcf) 96.28%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1495   +/-   ##
=======================================
  Coverage   96.28%   96.28%           
=======================================
  Files          49       49           
  Lines        3931     3931           
=======================================
  Hits         3785     3785           
  Misses        146      146           
Impacted Files Coverage Δ
sdv/multi_table/hma.py 80.12% <ø> (ø)
sdv/multi_table/base.py 98.58% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@amontanez24 amontanez24 requested review from pvk-developer and removed request for fealho July 7, 2023 17:07
pbar_args.update(kwargs)

return pbar_args

def _print(self, text='', **kwargs):
if self.verbose:
print(text, **kwargs) # noqa: T001
print(text, **kwargs) # noqa: T001
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to still have this only print when verbose is true? It gets called in the fit still to print an empty line

Copy link
Contributor Author

@R-Palazzo R-Palazzo Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't know. Because verbose was True by default I kept it, but maybe we can drop it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still print the new line, but only when the progress bar is actually printed. Maybe the easier fix is to set verbose to False in the base class and set it to what the user provides in HMA.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, done in 29c5c16

@@ -71,7 +71,7 @@ def _print(self, text='', **kwargs):
if self.verbose:
print(text, **kwargs) # noqa: T001

def __init__(self, metadata, locales=None, synthesizer_kwargs=None, verbose=True):
def __init__(self, metadata, locales=None, synthesizer_kwargs=None, verbose=False):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I meant remove it as a parameter but set it to false below

@@ -32,12 +32,11 @@ class HMASynthesizer(BaseHierarchicalSampler, BaseMultiTableSynthesizer):
}

def __init__(self, metadata, locales=None, verbose=True):
BaseMultiTableSynthesizer.__init__(self, metadata, locales=locales)
BaseMultiTableSynthesizer.__init__(self, metadata, locales=locales, verbose=verbose)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we would just set it to true after calling

BaseMultiTableSynthesizer.__init__(self, metadata, locales=locales)

Copy link
Contributor

@amontanez24 amontanez24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@R-Palazzo R-Palazzo merged commit 804b52e into master Jul 10, 2023
28 checks passed
@R-Palazzo R-Palazzo deleted the issue-1486-progress-bar-HMA branch July 10, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move progress bar out of base multi table synthesizer
4 participants