Update pubchem_selfies.py
Browse files- pubchem_selfies.py +1 -1
pubchem_selfies.py
CHANGED
@@ -473,7 +473,7 @@ class PubchemSelfies(datasets.GeneratorBasedBuilder):
|
|
473 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
474 |
for filepath in subdirs:
|
475 |
with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8") as f:
|
476 |
-
for key, row in enumerate(
|
477 |
data = json.loads(row)
|
478 |
properties = data["molecules"][0]["properties"]
|
479 |
yield key, {
|
|
|
473 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
474 |
for filepath in subdirs:
|
475 |
with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8") as f:
|
476 |
+
for key, row in enumerate(f):
|
477 |
data = json.loads(row)
|
478 |
properties = data["molecules"][0]["properties"]
|
479 |
yield key, {
|