Skip to content
This repository was archived by the owner on Feb 1, 2026. It is now read-only.
This repository was archived by the owner on Feb 1, 2026. It is now read-only.

Missing dependencies for v0.6.2 features (sentence-transformers, numpy) #99

@mimosel

Description

@mimosel

Summary

The v0.6.2 release introduces "Mid-Stream Semantic Memory" and "Plan Mode Integration" as headline features, but the required dependencies (sentence-transformers, numpy) are not declared in requirements.txt or pyproject.toml. The features silently fall back to keyword matching without any warning.

Environment

  • ELF Version: v0.6.2 (commit 4a05771)
  • OS: Windows 11
  • Python: 3.11
  • Discovery Date: 2026-01-29

Problem Description

Missing Dependencies

Dependency Required By Status in requirements.txt Status in pyproject.toml
sentence-transformers semantic_search.py, semantic-memory.py MISSING MISSING
numpy semantic_search.py (vector operations) MISSING MISSING
openai (optional) semantic_search.py (fallback embeddings) MISSING MISSING

Affected Files

src/query/semantic_search.py (lines 27-30, 23)
.hooks-templates/PreToolUse/semantic-memory.py (line 26)
src/hooks/learning-loop/pre_tool_semantic_memory.py (line 26)

Code Evidence

The code uses try/except for graceful degradation:

# src/query/semantic_search.py
try:
    from sentence_transformers import SentenceTransformer
    SENTENCE_TRANSFORMERS_AVAILABLE = True
except ImportError:
    SENTENCE_TRANSFORMERS_AVAILABLE = False

This means:

  • No error is raised
  • Features silently fall back to keyword matching
  • Users think they have semantic search, but they don't

Impact

  1. Misleading release notes: v0.6.2 advertises "Mid-Stream Semantic Memory" but it doesn't work out of the box
  2. Silent degradation: No warning that semantic features are disabled
  3. Installation incomplete: pip install -r requirements.txt does not provide full functionality
  4. User confusion: "Why isn't semantic search finding relevant heuristics?"

Steps to Reproduce

  1. Fresh install of ELF v0.6.2
  2. Run pip install -r requirements.txt
  3. Check for sentence-transformers:
    python -c "from sentence_transformers import SentenceTransformer; print('OK')"
    # Result: ModuleNotFoundError
  4. The semantic memory hook will run but fall back to keyword matching

Expected Behavior

Either:

  1. Option A: Dependencies should be in requirements.txt so features work after standard install
  2. Option B: Dependencies should be in pyproject.toml under [project.optional-dependencies] with clear documentation
  3. Option C: A warning should be logged when semantic features are disabled due to missing dependencies

Suggested Fix

Option A: Add to requirements.txt

# Semantic search (for mid-stream memory)
sentence-transformers>=2.3.0
numpy>=1.24.0

Option B: Add as optional dependency in pyproject.toml

[project.optional-dependencies]
semantic = [
    "sentence-transformers>=2.3.0",
    "numpy>=1.24.0",
]

With install command: pip install emergent-learning-framework[semantic]

Option C: Add warning when disabled

if not SENTENCE_TRANSFORMERS_AVAILABLE:
    import warnings
    warnings.warn(
        "sentence-transformers not installed. Semantic search disabled. "
        "Install with: pip install sentence-transformers",
        UserWarning
    )

Current Workaround

Manual installation:

pip install sentence-transformers numpy

Note: sentence-transformers is ~500MB including PyTorch dependencies.

Additional Context

The documentation in docs/mid-stream-semantic-memory.md does mention the dependency on line 145-146, but:

  1. This file is not prominently linked from README
  2. The release notes don't mention additional dependencies
  3. Users following standard install procedures won't see this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions