Skip to content

Embeddings silently disabled for upgrading users (HIVEMIND_EMBEDDINGS unset → enabled=false) #184

@kaghni

Description

@kaghni

Symptom

Users upgrading past bfc8e07 (and fresh installs that don't set HIVEMIND_EMBEDDINGS=true) get embeddings persistently disabled on first SDK call. ~/.deeplake/config.json ends up with {embeddings: {enabled: false}} forever — until the user explicitly runs hivemind embeddings install (which writes enabled: true).

Root cause

src/user-config.ts:67 documents the migration rule as:

HIVEMIND_EMBEDDINGS=false OR unset → enabled: false
HIVEMIND_EMBEDDINGS=true (or any other truthy) → enabled: true

And migrationValueFromEnv() at line 96 implements that literally:

if (raw === undefined) return false;

So on first call to getEmbeddingsEnabled() (no config yet, env var unset), it returns false and persists that to disk. The decision becomes sticky.

Impact

Suggested fix

Per CodeRabbit on #182:

 function migrationValueFromEnv() {
   const raw = process.env.HIVEMIND_EMBEDDINGS;
-  if (raw === undefined) return false;
+  if (raw === undefined) return undefined;
   if (raw === "false") return false;
   return true;
 }

And update getEmbeddingsEnabled() to treat undefined from migration as "default true" (no opt-out signal present).

Why not in PR #182

#182's scope is the user-visible banner removal. Changing the migration default touches Emanuele's intentional design rule (bfc8e07) — needs his judgment call on opt-in vs opt-out.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions