-
Notifications
You must be signed in to change notification settings - Fork 305
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
Conversation
Codecov ReportPatch coverage:
❗ 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
☔ View full report in Codecov by Sentry. |
sdv/multi_table/base.py
Outdated
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, done in 29c5c16
sdv/multi_table/base.py
Outdated
@@ -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): |
There was a problem hiding this comment.
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
sdv/multi_table/hma.py
Outdated
@@ -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) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve #1486