Skip to content

fix: pass documents as keyword argument in EmbeddingBasedDocumentSplitter#11022

Closed
Amnah199 wants to merge 1 commit intomainfrom
fix-error-embeddingsplitter
Closed

fix: pass documents as keyword argument in EmbeddingBasedDocumentSplitter#11022
Amnah199 wants to merge 1 commit intomainfrom
fix-error-embeddingsplitter

Conversation

@Amnah199
Copy link
Copy Markdown
Contributor

@Amnah199 Amnah199 commented Apr 1, 2026

Related Issues

EmbeddingBasedDocumentSplitter._calculate_embeddings calls document_embedder.run with a positional argument. This fails when the embedder's run() method only accepts **kwargs
(e.g. deepset Cloud's Code component wrapper) raising:

TypeError: Code.run() takes 1 positional argument but 2 were given.

Note: There is an example pipeline with logs in the linear ticket.

Proposed Changes:

Changed both call sites to use keyword arguments.

How did you test it?

Notes for the reviewer

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@Amnah199 Amnah199 requested a review from a team as a code owner April 1, 2026 22:36
@Amnah199 Amnah199 requested review from anakin87 and removed request for a team April 1, 2026 22:36
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
haystack-docs Ignored Ignored Apr 1, 2026 10:36pm

Request Review

@Amnah199 Amnah199 added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Apr 1, 2026
@sjrl
Copy link
Copy Markdown
Contributor

sjrl commented Apr 2, 2026

@Amnah199 I think this is technically a fine change, but just as a heads up the protocol for DocumentEmbedder does indicate that the embedder should accept at least one positional argument called documents. So it would probably also be good to update the embedder causing the issue to change documents to a positional argument.

@sjrl sjrl requested review from sjrl and removed request for anakin87 April 2, 2026 07:32
@sjrl sjrl self-assigned this Apr 2, 2026
@Amnah199
Copy link
Copy Markdown
Contributor Author

Amnah199 commented Apr 2, 2026

The issue was addressed in https://github.com/deepset-ai/deepset-cloud-custom-nodes/pull/604.
Closing this PR because the update is not needed.

@Amnah199 Amnah199 closed this Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release-notes PRs with this flag won't be included in the release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants