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
Silent mode when creating reports. #269
Comments
Hi @alejandrofdez-us, thanks for filing this feature request. We'll keep it open and provide updates as we solve it. WorkaroundsIf you'd like to run your reports in the meantime, there seem to be methods for silencing the statements on your own outside of the Trying these suggestions seemed to correctly silence the output for me (but your mileage may vary). from tqdm import tqdm
from functools import partialmethod
from sdmetrics import load_demo
from sdmetrics.reports.single_table import QualityReport
import sys, os
# silence the tqdm and printing functions
tqdm.__init__ = partialmethod(tqdm.__init__, disable=True)
sys.stdout = open(os.devnull, 'w')
# generate the report
real_data, synthetic_data, metadata = load_demo(modality='single_table')
report = QualityReport()
report.generate(real_data, synthetic_data, metadata) |
Dear npatki, Overall Quality Score: 82.84%
Properties:
Column Shapes: 82.78%
Column Pair Trends: 82.9% Fortunately, at least tqdm is disabled with your proposal, but sdv manages to get the real stdout somehow. |
Apart from reporting, I would add that the sampling generation should have a silence mode as well. |
You're welcome! Based on how exactly you are running the Python script, there may be other solutions to this. For example, here is another option.
You are welcome to file a new issue for this in the SDV library. We can use it to separately track and provide updates for it. |
Update! This is on the roadmap for the next SDMetrics release. Both quality and diagnostic reports will include a report = QualityReport()
report.generate(real_data, synthetic_data, metadata, verbose=False)
report = DiagnosticReport()
report.generate(real_data, synthetic_data, metadata, verbose=False) |
Problem Description
Creating a batch of reports prints all details in console.
Expected behavior
A silent option when creating the report would be appreciated.
Additional context
I have a huge set of experiments, with lots of synthetic samples. I compute the quality and diagnostic reports for every sample, and every experiment, so the console is continuosly printing all reports summaries, which is not useful. I store these metrics as CSV to make further comparisons between experiments.
The text was updated successfully, but these errors were encountered: