Skip to content

Tokenization error for ReCoRD #1144

@claravania

Description

@claravania

Describe the bug
Error when tokenizing with roberta-large.

ReCoRDTask
  [train]: /scratch/bowman/IRT_Experiments/jiant-2/experiments/tasks/data/record/train.jsonl
  [test]: /scratch/bowman/IRT_Experiments/jiant-2/experiments/tasks/data/record/test.jsonl
  [val]: /scratch/bowman/IRT_Experiments/jiant-2/experiments/tasks/data/record/val.jsonl
Traceback (most recent call last):
  File "/scratch/cv50/jiant-2/jiant/jiant/proj/main/tokenize_and_cache.py", line 214, in <module>
    main(args=RunConfiguration.run_cli_json_prepend())
  File "/scratch/cv50/jiant-2/jiant/jiant/proj/main/tokenize_and_cache.py", line 165, in main
    examples=task.get_train_examples(),
  File "/scratch/cv50/jiant-2/jiant/jiant/tasks/lib/record.py", line 122, in get_train_examples
    return self._create_examples(lines=read_json_lines(self.train_path), set_type="train")
  File "/scratch/cv50/jiant-2/jiant/jiant/tasks/lib/record.py", line 134, in _create_examples
    passage_text = line["passage"]["text"]
TypeError: string indices must be integers

To Reproduce

  1. commit: aa4d111
  2. Describe the environment where you're using jiant, e.g, "2 P40 GPUs": 1 P40 GPU
  3. Provide the experiment config artifact (e.g., defaults.conf):
{
  "task": "record",
  "paths": {
    "train": "/scratch/bowman/IRT_Experiments/jiant-2/experiments/tasks/data/record/train.jsonl",
    "test": "/scratch/bowman/IRT_Experiments/jiant-2/experiments/tasks/data/record/test.jsonl",
    "val": "/scratch/bowman/IRT_Experiments/jiant-2/experiments/tasks/data/record/val.jsonl"
  },
  "name": "record"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions