Skip to content

fix(embedder): list(dense) returns ndarray objects not float lists -- Qdrant serialization crash on every BgeM3 ingest #286

Closed

Description

@piyushmakhija28

Summary

BgeM3Embedder.embed() returns list(dense) where dense is a 2D numpy array of shape (N, 1024). list(numpy_2d_array) yields a list of 1-D numpy arrays, NOT a list of Python float lists. _validate_embed_dimension passes them silently (numpy len() works). But when Qdrant's upsert_points() serializes the vector payload, it raises TypeError: Object of type ndarray is not JSON serializable, crashing the ingest pipeline after all parse/chunk work is done.

Root cause

Fix #245 added the three-key probe (dense_vecs / dense / embeddings) but the return statement at line 242 did not convert numpy arrays to Python lists.

Fix

ingestion/embedder.py line 242: change return list(dense) to return dense.tolist() which recursively converts numpy arrays to Python floats.

Impact

Every document ingestion using BgeM3Embedder crashes at the Qdrant upsert step with a confusing serialization error instead of indexing the document.

Activity

  1. piyushmakhija28 commented on Jun 21, 2026

    @piyushmakhija28
    ContributorAuthor

    Fixed in PR #280 (Sprint R3/R4: fix(sprint-r3): root-cause fixes for all 39 bugs from code review round 3 + Sprint R4 round 4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcode-reviewFound via automated code reviewpriority: criticalBlocks all requests or crashes startup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions