Skip to content

docs: replace old haystack core imports with haystack_integrations paths - #3545

Merged
julian-risch merged 1 commit into
mainfrom
docs/replace-migrated-component-imports
Jul 6, 2026
Merged

docs: replace old haystack core imports with haystack_integrations paths#3545
julian-risch merged 1 commit into
mainfrom
docs/replace-migrated-component-imports

Conversation

@julian-risch

@julian-risch julian-risch commented Jul 3, 2026

Copy link
Copy Markdown
Member

Related Issues

Proposed Changes:

  • Replace stale from haystack.components.embedders import SentenceTransformers... imports with the new from haystack_integrations.components.embedders.sentence_transformers import ... paths in the usage examples of retriever docstrings (these generate the API reference pages): arcadedb, elasticsearch (x2), faiss, opensearch, pgvector, pinecone, supabase, valkey, and the transformers TransformersZeroShotTextRouter
  • Add a # Requires: pip install sentence-transformers-haystack comment above the new imports in docstring examples
  • Same import replacement in example scripts of alloydb, astra, azure_ai_search, langfuse, llama_cpp, mongodb_atlas, pgvector, pinecone, pyversity, qdrant, valkey, vespa, and weave (plus HuggingFaceAPIChatGenerator in the langfuse chat example)
  • Rename TransformersSimilarityRankerSentenceTransformersSimilarityRanker in the weave hybrid-retrieval example (old core class name and old import path)
  • Remove explicit warm_up() calls on SentenceTransformers embedders in docstrings/examples — their run() auto-invokes warm-up

How did you test it?

  • python -m py_compile on all changed files
  • hatch fmt --check passes on the changed sources; a scan confirms zero remaining old-path imports of migrated classes in the repo

Notes for the reviewer

I chose not to mention the extra new dependency in example files but only in the docstring examples. Happy to discuss other options.

Checklist

🤖 Generated with Claude Code

SentenceTransformers embedders/rankers moved from Haystack core to this
repo ahead of Haystack 3.0, but retriever docstrings and example scripts
still imported them from haystack.components. Update docstring usage
examples (which generate the API reference pages) and example scripts to
the new haystack_integrations import paths, note the required
sentence-transformers-haystack package, and drop explicit warm_up() calls
now that the embedders auto-warm-up on run().

Also rename TransformersSimilarityRanker to
SentenceTransformersSimilarityRanker in the weave example.

Related to deepset-ai/haystack-private#449

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (pinecone)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (arcadedb)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (faiss)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (astra)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (azure_ai_search)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (qdrant)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (mongodb_atlas)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (pyversity)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (pgvector)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (langfuse)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (alloydb)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (valkey)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (weave)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (supabase)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (elasticsearch)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (opensearch)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (vespa)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (transformers)

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report (llama_cpp)

This PR does not seem to contain any modification to coverable code.

@julian-risch
julian-risch marked this pull request as ready for review July 3, 2026 13:26
@julian-risch
julian-risch requested a review from a team as a code owner July 3, 2026 13:26
@julian-risch
julian-risch requested review from bogdankostic and removed request for a team July 3, 2026 13:26
@julian-risch
julian-risch merged commit bf93c2f into main Jul 6, 2026
126 of 130 checks passed
@julian-risch
julian-risch deleted the docs/replace-migrated-component-imports branch July 6, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment