GEM-benchmark / GEM-metrics

Automatic metrics for GEM tasks
https://gem-benchmark.com
MIT License
61 stars 20 forks source link

Cannot run example command with example data #51

Closed lxuechen closed 3 years ago

lxuechen commented 3 years ago

After cloning repo and installing requirements, running the following given example fails

./run_metrics.py test_data/single_dataset.outs.json -r test_data/single_dataset.refs.json
Traceback (most recent call last):
  File "./run_metrics.py", line 7, in <module>
    gem_metrics.main()
  File "/Users/xuechenli/remote/GEM-metrics/gem_metrics/__init__.py", line 543, in main
    process_files(config)
  File "/Users/xuechenli/remote/GEM-metrics/gem_metrics/__init__.py", line 439, in process_files
    refs = References(config.references_file)
  File "/Users/xuechenli/remote/GEM-metrics/gem_metrics/texts.py", line 149, in __init__
    super().__init__(data_key="target", data=data, language=language)
  File "/Users/xuechenli/remote/GEM-metrics/gem_metrics/texts.py", line 39, in __init__
    if isinstance(self.all_data[0], str):
KeyError: 0