mirror of
https://github.com/lancedb/lancedb.git
synced 2026-05-19 04:50:40 +00:00
Handle NaN input data (#241)
Sometimes LangChain would insert a single `[np.nan]` as a placeholder if the embedding function failed. This causes a problem for Lance format because then the array can't be stored as a FixedSizedListArray. Instead: 1. By default we remove rows with embedding lengths less than the maximum length in the batch 2. If `strict=True` kwargs is set to True, then a `ValueError` is raised if the embeddings aren't all the same length --------- Co-authored-by: Chang She <chang@lancedb.com>
This commit is contained in:
@@ -15,7 +15,6 @@ import unittest.mock as mock
|
||||
|
||||
import lance
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import pandas.testing as tm
|
||||
import pyarrow as pa
|
||||
import pytest
|
||||
|
||||
Reference in New Issue
Block a user