-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
When creating an HFTextVectorizer and passing show_progress_bar=False, an error is thrown by SentenceTransformers — I haven't found another way of disabling the progress bar from polluting logs.
Expected behavior:
• The progress bar should be hidden when show_progress_bar=False.
Actual behavior:
• An error is thrown:
File "/Users/raphaeldelio/Documents/GitHub/redis/devrel-content-crawler/.venv/lib/python3.11/site-packages/redisvl/utils/vectorize/text/huggingface.py", line 103, in _initialize_client
self._client = SentenceTransformer(model, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Code that threw the error:
def _get_router(self):
"""Get the singleton router instance"""
if self._router is None:
routes = self._create_routes()
self._router = SemanticRouter(
name="filter-router",
vectorizer=HFTextVectorizer(
model="sentence-transformers/all-MiniLM-L6-v2",
**show_progress_bar=False**
),
routes=routes,
redis_url="redis://localhost:6379",
overwrite=True
)
return self._router
Metadata
Metadata
Assignees
Labels
No labels