Skip to content

Add: python API method to add custom embeddings#1615

Draft
IgorSusmelj wants to merge 11 commits into
mainfrom
igor-lig-10159-figure-out-use-custom-embedding-model-in-studio
Draft

Add: python API method to add custom embeddings#1615
IgorSusmelj wants to merge 11 commits into
mainfrom
igor-lig-10159-figure-out-use-custom-embedding-model-in-studio

Conversation

@IgorSusmelj

Copy link
Copy Markdown
Contributor

What has changed and why?

  • Add sample.set_embedding(...) so users can plug in embeddings from their own model instead of the built-in one.
  • Add an example script (example_custom_embeddings.py) and a new docs section showing how to use it, including its current limitations (no text search, image/video samples only).
  • Add tests covering the new method and the interaction with the embedding plot and search UI.

How has it been tested?

  • New unit tests

Did you update CHANGELOG.md?

  • Yes
  • Not needed (internal change)

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d48575e8-e667-48db-a9fa-13f845656e5c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch igor-lig-10159-figure-out-use-custom-embedding-model-in-studio

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

db_migrations.run_migrations(engine=engine, engine_url=engine_url)


def _migrate_duckdb_schema(engine: Engine) -> None:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This we could also leave away


def collection_has_embeddings(session: Session, collection_id: UUID) -> bool:
"""Check if there are any embeddings available for the given collection.
class CollectionEmbeddingsStatus(SQLModel):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was refactored. The new status tells us whether we have embeddings and whether we have text embeddings for search. We can later allow the user to hook up their own text encoder model to do also text based search with custom models.

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.

1 participant