lhoestq HF Staff commited on
Commit
c9c4e09
·
1 Parent(s): 58f6a14

Update pubchem_selfies.py

Browse files
Files changed (1) hide show
  1. 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(rows):
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, {