File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/huggingface_hub/utils Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -199,13 +199,16 @@ def are_progress_bars_disabled(name: Optional[str] = None) -> bool:
199
199
200
200
201
201
def is_tqdm_disabled (log_level : int ) -> Optional [bool ]:
202
+ """
203
+ Determine if tqdm progress bars should be disabled based on logging level and environment settings.
204
+
205
+ see https://github.com/huggingface/huggingface_hub/pull/2000 and https://github.com/huggingface/huggingface_hub/pull/2698.
206
+ """
202
207
if log_level == logging .NOTSET :
203
208
return True
204
209
if os .getenv ("TQDM_POSITION" ) == "-1" :
205
210
return False
206
211
return None
207
- # ^ set `disable=None` rather than `disable=False` by default to disable progress bar when no TTY attached
208
- # see https://github.com/huggingface/huggingface_hub/pull/2000
209
212
210
213
211
214
class tqdm (old_tqdm ):
You can’t perform that action at this time.
0 commit comments