Skip to content

Commit 09ef2b0

Browse files
author
huibishe
committed
Change ground truth name in the data loading function
Signed-off-by: huibishe <[email protected]>
1 parent baa36df commit 09ef2b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_posts/2025-02-28-a-practical-guide-for-selecting-HNSW-hyperparameters.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ from requests_aws4auth import AWS4Auth
239239

240240
#### Modify the data loading function to load your own data
241241

242-
The following function assumes an `hdf5` file with the keys `"documents"`, `"queries"`, and `"ground_truth_l2"`:
242+
The following function assumes an `hdf5` file with the keys `"documents"`, `"queries"`, and `"ground_truth"`:
243243

244244
```python
245245
def load_data(local_file_path: str) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
@@ -259,7 +259,7 @@ def load_data(local_file_path: str) -> Tuple[np.ndarray, np.ndarray, np.ndarray]
259259
hdf5_file = h5py.File(local_file_path, "r")
260260
vectors = hdf5_file["documents"]
261261
query_vectors = hdf5_file["queries"]
262-
neighbors = hdf5_file["ground_truth_l2"]
262+
neighbors = hdf5_file["ground_truth"]
263263
return vectors, query_vectors, neighbors
264264
```
265265

0 commit comments

Comments
 (0)