allenai / allenai/qasper-led-baseline
qasper_baselines gives error with v0.3 train data
- Ngôn ngữ chính
- Python
- Star
- 61
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
`allennlp train training_config/led_base_smaller_context.jsonnet -s output --include-package qasper_baselines `
I am getting the error in dataset_reader.py while running the above command.
```
File "XX/qasper-led-baseline/qasper_baselines/dataset_reader.py", line 139, in _read
yield from self._read_json_lines(file_path)
File "XX/qasper-led-baseline/qasper_baselines/dataset_reader.py", line 161, in _read_json_lines
yield from self._article_to_instances(data)
File "XX/qasper-led-baseline/qasper_baselines/dataset_reader.py", line 170, in _article_to_instances
paragraphs = self._get_paragraphs_from_article(article)
File "XX/qasper-led-baseline/qasper_baselines/dataset_reader.py", line 411, in _get_paragraphs_from_article
if section_info["section_name"] is not None:
TypeError: string indices must be integers
```
The structure for full_text is a list in dummy data like following:
https://huggingface.co/datasets/allenai/qasper/tree/main/dummy/qasper/0.1.0
```
"full_text": [
{
"section_name": "Introduction",
"paragraphs": [
"Affective events BIBREF0 are events that typically affect peopl amount of supervision, they performed well. In addition, the combination of annotated and unannotated data yielded a gain over a purely supervised baseline when labeled data were small."
]
},
{
"section_name": "Related Work",
"paragraphs": [
"Learning affective events is closely relateed corpus (ACP Corpus). They automatically gathered sentences that had positive or negative opinions utilizing HTML layout structures in addition to linguistic patterns. Our method depends only on raw texts and thus has wider applicability.",
""
]
},
...
]
```
Whereas in train, validation and test data v0.3 it is different:
https://huggingface.co/datasets/allenai/qasper
```
"full_text":{
"section_name":[
"Introduction",
"Related Work",
"Proposed Method",
...
],
"paragraphs":[
[
"Affective events BIBREF0 are events that typically affect people in positive or negative ways. For example, getting money and playing sports are usually positive to the experiencers; catching cold and losing one's wallet are negative. Understanding affective events is important to various natural language processing (NLP) applications such as dialogue systems BIBREF1, question-answering systems BIBREF2, and humor recognition BIBREF3. In this paper, we work on recognizing the polarity of an affective event that is represented by a score ranging from $-1$ (negative) to 1 (positive).",
...
],
[
...
],
]
},
```
All the scripts for reading data is in accordance to the dummy data not the actual data loaded from the HF.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.