Skip to content

Commit

Permalink
fix search in setup
Browse files Browse the repository at this point in the history
  • Loading branch information
enjalot committed Feb 26, 2025
1 parent 2f56102 commit 9a37143
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions latentscope/server/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/FilterDataTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9a37143

Please sign in to comment.