Skip to content

fix(builder): handle None batches in batch vectorizer flatten#748

Open
SAY-5 wants to merge 1 commit intoOpenSPG:masterfrom
SAY-5:fix/batch-vectorizer-747
Open

fix(builder): handle None batches in batch vectorizer flatten#748
SAY-5 wants to merge 1 commit intoOpenSPG:masterfrom
SAY-5:fix/batch-vectorizer-747

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 5, 2026

Closes #747

asyncio.gather can yield None entries when avectorize returns nothing for a batch (e.g. transient API failure), causing TypeError: 'NoneType' object is not iterable in _agenerate_dense_vectors and _agenerate_sparse_vectors at the final flatten. Skip None sublists when flattening so a single bad batch no longer aborts the whole subgraph.

asyncio.gather can yield None entries when avectorize fails or
returns no embeddings for a batch, causing 'NoneType is not
iterable' in _agenerate_dense_vectors / _agenerate_sparse_vectors.
Skip None sublists when flattening so partial failures no longer
abort the whole subgraph.

Closes OpenSPG#747

Signed-off-by: SAY-5 <say.apm35@gmail.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.

怎么解决啊 TypeError: 'NoneType' object is not iterable

1 participant