nickkunz / smogn

Synthetic Minority Over-Sampling Technique for Regression
https://pypi.org/project/smogn
GNU General Public License v3.0
319 stars 78 forks source link

Reducing verboseness #30

Open L-Marriott opened 2 years ago

L-Marriott commented 2 years ago

Is there an option to reduce the printed output? I'm running this in a notebook and every time I synthesize, the cell prints these:

dist_matrix: 100%|##########| 14/14 [00:00<00:00, 400.82it/s]
synth_matrix: 100%|##########| 14/14 [00:00<00:00, 637.42it/s]
r_index: 100%|##########| 5/5 [00:00<00:00, 626.63it/s]

I'd just like to hide these really.

nickkunz commented 2 years ago

Thank you for your feedback. I'd like to know if others are interested in a feature which suppresses verbosity?

rrealrangel commented 2 years ago

Hello. I use this package within a nested cross validation along with optuna (for automatic hyperparameters optimization). After each loop, its error and parameters used are shown so one can monitor it in real-time. However, due to the verboseness of the smogn package, I'm not able to read the results of each loop, because they rapidly get lost in the terminal. As @L-Marriott, I also would appreciate if an option to disable the smogn outputs were available. Thanks.

DarioSim commented 1 week ago

Removing tqdm loops and substituting them on over_sampling.py would solve the issue

example:
for i in tqdm(range(n), ascii = True, desc = "synth_matrix"): becomes: for i in range(n):

https://github.com/nickkunz/smogn/blob/e4e5e4aca43a07ebbd1a0ed881f4de1e24abb8ed/smogn/over_sampling.py#L5