Skip to content

Commit

Permalink
feat: conditional tqdm helper
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiserRuben committed Jul 14, 2024
1 parent e2e695b commit ad76e98
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/utils/tqdm_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from tqdm import tqdm


def conditional_tqdm(iterable, condition=True, **kwargs):
if condition:
return tqdm(iterable, **kwargs)
return iterable

0 comments on commit ad76e98

Please sign in to comment.