Skip to content

fix(sleep): drop stale embeddings with non-modal dimension#84

Open
rajkripal wants to merge 1 commit into
mainfrom
fix/sleep-embedding-dim-filter
Open

fix(sleep): drop stale embeddings with non-modal dimension#84
rajkripal wants to merge 1 commit into
mainfrom
fix/sleep-embedding-dim-filter

Conversation

@rajkripal

Copy link
Copy Markdown
Owner

Summary

  • Dream nodes embedded with the old all-MiniLM-L6-v2 model (384-dim) crash np.array() when mixed with current gte-large embeddings (1024-dim)
  • Filters _load_embedding_matrix to keep only the modal dimension, dropping stale embeddings with a warning log
  • Fixes the sleep protocol crashing every cycle from mismatched embedding dimensions

Test plan

  • All 76 sleep tests pass (pytest tests/ -k sleep)
  • Warning is emitted when non-modal embeddings are dropped
  • Sleep cycle completes without ValueError: setting an array element with a sequence

Note: test_think_ingest_respects_diversity_threshold fails on main and is unrelated to this change.

🤖 Generated with Claude Code

…mbedding_matrix

Dream nodes embedded with the old all-MiniLM-L6-v2 model (384-dim) crash
np.array() when mixed with gte-large embeddings (1024-dim). Filter to the
modal dimension so sleep never crashes from leftover old-model embeddings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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