slhenty commited on
Commit
ad22ee0
1 Parent(s): 1ab00a7

load script: correct file handle

Browse files
Files changed (1) hide show
  1. climate-fever-nli-stsb.py +1 -1
climate-fever-nli-stsb.py CHANGED
@@ -180,7 +180,7 @@ class ClimateFeverNliStsb(datasets.GeneratorBasedBuilder):
180
  # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
181
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
182
  with open(filepath, encoding="utf-8") as f:
183
- reader = csv.DictReader(fIn, delimiter='\t', quoting=csv.QUOTE_NONE)
184
  for key, row in enumerate(reader):
185
  if self.config.name in ("cf-nli", "cf-nli-nei"):
186
  # Yields examples as (key, example) tuples
 
180
  # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
181
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
182
  with open(filepath, encoding="utf-8") as f:
183
+ reader = csv.DictReader(f, delimiter='\t', quoting=csv.QUOTE_NONE)
184
  for key, row in enumerate(reader):
185
  if self.config.name in ("cf-nli", "cf-nli-nei"):
186
  # Yields examples as (key, example) tuples