Skip to content

Commit e176694

Browse files
docs(optimum): remove warm_up from examples (#2822)
Co-authored-by: David S. Batista <dsbatista@gmail.com>
1 parent 182342d commit e176694

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

integrations/optimum/src/haystack_integrations/components/embedders/optimum/optimum_document_embedder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class OptimumDocumentEmbedder:
3131
doc = Document(content="I love pizza!")
3232
3333
document_embedder = OptimumDocumentEmbedder(model="sentence-transformers/all-mpnet-base-v2")
34-
document_embedder.warm_up()
34+
# Components warm up automatically on first run.
3535
3636
result = document_embedder.run([doc])
3737
print(result["documents"][0].embedding)

integrations/optimum/src/haystack_integrations/components/embedders/optimum/optimum_text_embedder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class OptimumTextEmbedder:
2727
text_to_embed = "I love pizza!"
2828
2929
text_embedder = OptimumTextEmbedder(model="sentence-transformers/all-mpnet-base-v2")
30-
text_embedder.warm_up()
30+
# Components warm up automatically on first run.
3131
3232
print(text_embedder.run(text_to_embed))
3333

0 commit comments

Comments
 (0)