Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/backend/embedding_atlas/projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,21 @@ def _projection_for_texts(
if text_projector is None:
text_projector = _project_text_with_sentence_transformers

# Some arguments may contain sensitive info (e.g., API keys) or do not invalidate the cache, so we exclude them
excluded_text_projector_args = {"api_key", "api_base", "sync"}
hashed_text_projector_args = {
k: v
for k, v in (text_projector_args or {}).items()
if k not in excluded_text_projector_args
}
hasher = Hasher()
hasher.update(
{
"version": 2,
"texts": texts,
"model": model,
"batch_size": batch_size,
**(text_projector_args or {}),
"text_projector_args": hashed_text_projector_args,
"text_projector": text_projector.__name__,
"umap_args": umap_args,
}
Expand Down