Skip to content

disable progress bar by default #363

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

Merged
merged 1 commit into from
Aug 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions redisvl/utils/vectorize/text/huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ def _embed(self, text: str, **kwargs) -> List[float]:
if not isinstance(text, str):
raise TypeError("Must pass in a str value to embed.")

if "show_progress_bar" not in kwargs:
# disable annoying tqdm by default
kwargs["show_progress_bar"] = False

embedding = self._client.encode([text], **kwargs)[0]
return embedding.tolist()

Expand All @@ -151,6 +155,9 @@ def _embed_many(
raise TypeError("Must pass in a list of str values to embed.")
if len(texts) > 0 and not isinstance(texts[0], str):
raise TypeError("Must pass in a list of str values to embed.")
if "show_progress_bar" not in kwargs:
# disable annoying tqdm by default
kwargs["show_progress_bar"] = False

embeddings: List = []
for batch in self.batchify(texts, batch_size, None):
Expand Down
Loading