Fix feather reading
Browse filesfeather infers compression (cool!)
unsplash25k-image-embeddings.py
CHANGED
@@ -82,7 +82,7 @@ class Unsplash25kImageEmbeddingsDataset(datasets.GeneratorBasedBuilder):
|
|
82 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
83 |
def _generate_examples(self, embeddings_path, image_ids_path):
|
84 |
tensors = {}
|
85 |
-
image_ids = pd.read_feather(image_ids_path
|
86 |
with safe_open(embeddings_path, framework="pt", device="cpu") as f:
|
87 |
for key in f.keys():
|
88 |
tensors[key] = f.get_tensor(key)
|
|
|
82 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
83 |
def _generate_examples(self, embeddings_path, image_ids_path):
|
84 |
tensors = {}
|
85 |
+
image_ids = pd.read_feather(image_ids_path)
|
86 |
with safe_open(embeddings_path, framework="pt", device="cpu") as f:
|
87 |
for key in f.keys():
|
88 |
tensors[key] = f.get_tensor(key)
|