Nathan Lambert
commited on
Commit
·
0fa9345
1
Parent(s):
d5f806c
change file reading permissions
Browse files- geodiff-example-data.py +5 -5
geodiff-example-data.py
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
import csv
|
18 |
import json
|
19 |
import os
|
20 |
-
import torch
|
21 |
import datasets
|
22 |
|
23 |
|
@@ -44,7 +44,7 @@ url = {https://doi.org/10.7910/DVN/JNGTDF}
|
|
44 |
# The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
|
45 |
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
46 |
_URLS = {
|
47 |
-
"drugs": "https://huggingface.co/datasets/fusing/geodiff-example-data/
|
48 |
}
|
49 |
|
50 |
|
@@ -116,8 +116,8 @@ class GeoDiffExampleData(datasets.GeneratorBasedBuilder):
|
|
116 |
|
117 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
118 |
def _generate_examples(self, filepath, split):
|
119 |
-
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
120 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
121 |
-
with open(filepath,
|
122 |
-
data = torch.load(f)
|
|
|
123 |
yield data
|
|
|
17 |
import csv
|
18 |
import json
|
19 |
import os
|
20 |
+
# import torch
|
21 |
import datasets
|
22 |
|
23 |
|
|
|
44 |
# The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
|
45 |
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
46 |
_URLS = {
|
47 |
+
"drugs": "https://huggingface.co/datasets/fusing/geodiff-example-data/blob/main/data/molecules.pkl",
|
48 |
}
|
49 |
|
50 |
|
|
|
116 |
|
117 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
118 |
def _generate_examples(self, filepath, split):
|
|
|
119 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
120 |
+
with open(filepath, , "rb") as f:
|
121 |
+
# data = torch.load(f)
|
122 |
+
data = pickle.load(f)
|
123 |
yield data
|