Skip to content
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

Expose show_progress_bar #236

Merged
merged 1 commit into from
Oct 11, 2024
Merged

Expose show_progress_bar #236

merged 1 commit into from
Oct 11, 2024

Conversation

antonum
Copy link
Contributor

@antonum antonum commented Oct 11, 2024

Address #232

Now **kwargs are being passed from hf.embed() and hf.embed_many() to the underlying model.encode()

from redisvl.utils.vectorize import HFTextVectorizer
from tqdm.auto import tqdm
hf = HFTextVectorizer(model="sentence-transformers/all-MiniLM-L6-v2")
# Embed a sentence
test = hf.embed("This is a test sentence.", show_progress_bar=True) #progress bar would show
test = hf.embed("This is a test sentence.") #progress bar would show (default behavior as before)
test = hf.embed("This is a test sentence.", show_progress_bar=False) #progress bar would NOT show

# Uncomment to see vector embedding output
print(test[:10])

@tylerhutcherson tylerhutcherson added the enhancement New feature or request label Oct 11, 2024
Copy link
Collaborator

@tylerhutcherson tylerhutcherson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tylerhutcherson tylerhutcherson merged commit bdef909 into redis:main Oct 11, 2024
2 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants