diff --git a/latentscope/server/search.py b/latentscope/server/search.py index 264182f..0e1b8b3 100644 --- a/latentscope/server/search.py +++ b/latentscope/server/search.py @@ -50,11 +50,11 @@ def nn(): model = EMBEDDINGS[dataset + "-" + embedding_id] # If lancedb is available, we use it to search - lance_path = os.path.join(DATA_DIR, dataset, "lancedb", scope_id + ".lance") - print("LANCE PATH", lance_path) - if os.path.exists(lance_path): - print(f"Found LanceDB index at {lance_path}, using vector search") - return nn_lance(dataset, scope_id, model, query, dimensions) + if scope_id is not None: + lance_path = os.path.join(DATA_DIR, dataset, "lancedb", scope_id + ".lance") + if os.path.exists(lance_path): + print(f"Found LanceDB index at {lance_path}, using vector search") + return nn_lance(dataset, scope_id, model, query, dimensions) # Otherwise we use the nearest neighbors search from sklearn num = 150 diff --git a/web/src/components/FilterDataTable.jsx b/web/src/components/FilterDataTable.jsx index 4e951ef..2a346ff 100644 --- a/web/src/components/FilterDataTable.jsx +++ b/web/src/components/FilterDataTable.jsx @@ -387,7 +387,7 @@ function FilterDataTable({ setPageCount(totalPages); // console.log('======= SETTING ROWS =======', rows, timestamp); setRows(rows.map((row, idx) => ({ ...row, idx }))); - onDataTableRows(rows); + if (onDataTableRows) onDataTableRows(rows); // setRowsLoading(false); }); } else { diff --git a/web/src/lib/colors.js b/web/src/lib/colors.js index 58090d0..d5efc95 100644 --- a/web/src/lib/colors.js +++ b/web/src/lib/colors.js @@ -38,7 +38,7 @@ export const mapSelectionOpacity = [ ]; export const mapPointSizeRange = [ 3, // normal - 3.5, // selected + 5.5, // selected 2, // not selected 12.5, // hovered 0, // hidden