setfit icon indicating copy to clipboard operation
setfit copied to clipboard

[Minor] tqdm disabling doesn't work

Open AjayP13 opened this issue 1 year ago • 2 comments

Thanks for shipping v1.0 @tomaarsen.

I found a small issue, it seems like setfit.logging.disable_progress_bar() doesn't work. I believe it's because this import:

https://github.com/huggingface/setfit/blob/107ca56c8cf6f2d3e79e2519d7e5ec24a95ccc56/src/setfit/modeling.py#L28

Should instead be importing the tqdm from setfit.logging like:

from .logging import tqdm

so that it can use EmptyTqdm when progress bars are disabled.

AjayP13 avatar Dec 10 '23 18:12 AjayP13

This import may also need updating:

https://github.com/huggingface/setfit/blob/107ca56c8cf6f2d3e79e2519d7e5ec24a95ccc56/src/setfit/trainer.py#L20

AjayP13 avatar Dec 10 '23 19:12 AjayP13

Hello!

Thanks for raising this. SetFit bases it's progressbars on show_progress_bars in TrainingArguments as well as several other methods (predict, predict_proba). Ideally, both should work, but I don't have the bandwidth to look into that right now I'm afraid.

  • Tom Aarsen

tomaarsen avatar Jan 11 '24 11:01 tomaarsen