Skip to content

Conversation

@tanujnay112
Copy link
Contributor

@tanujnay112 tanujnay112 commented Dec 5, 2025

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • As titled, changed this EF parameter to be less confusing. store_tokens doesn't make sense as a parameter for an EF whose job is to get things.
  • New functionality
    • ...

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Migration plan

Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?

Observability plan

What is the plan to instrument and monitor this change?

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor Author

tanujnay112 commented Dec 5, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@tanujnay112 tanujnay112 marked this pull request as ready for review December 5, 2025 04:06
@tanujnay112 tanujnay112 requested a review from rescrv as a code owner December 5, 2025 04:06
@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Dec 5, 2025

Renamed store_tokens flag to include_tokens across sparse EFs

This PR renames the store_tokens flag to include_tokens for both the BM25 and Chroma Cloud Splade sparse embedding functions. The change propagates through constructor parameters, configuration serialization/deserialization, schema definitions, and the Rust BM25 implementation to keep flag semantics aligned across languages.

Key Changes

• Replaced store_tokens with include_tokens in ChromaBm25EmbeddingFunction, including constructor arguments, runtime usage, config getters, and build/update helpers.
• Updated ChromaCloudSpladeEmbeddingFunction to use include_tokens, added SparseVector import for type assertions, and aligned request payload and normalization logic.
• Renamed the corresponding field in BM25SparseEmbeddingFunction within rust/chroma/src/embed/bm25.rs, keeping default behavior intact.
• Refreshed JSON schemas schemas/embedding_functions/chroma_bm25.json and schemas/embedding_functions/chroma-cloud-splade.json to expose the new include_tokens property.

Affected Areas

• chromadb/utils/embedding_functions/chroma_bm25_embedding_function.py
• chromadb/utils/embedding_functions/chroma_cloud_splade_embedding_function.py
• rust/chroma/src/embed/bm25.rs
• schemas/embedding_functions/chroma_bm25.json
• schemas/embedding_functions/chroma-cloud-splade.json

This summary was automatically generated by @propel-code-bot

@blacksmith-sh

This comment has been minimized.

Copy link
Contributor

kylediaz commented Dec 5, 2025

What about include_tokens?

@tanujnay112 tanujnay112 changed the title [CHORE]: Change store_tokens to get_tokens [CHORE]: Change store_tokens to include_tokens Dec 5, 2025
@tanujnay112 tanujnay112 changed the base branch from detach_change to graphite-base/5959 December 5, 2025 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants