system HF staff commited on
Commit
4b18ec2
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - crowdsourced
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - cc-by-nc-4-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - sequence-modeling
18
+ task_ids:
19
+ - sequence-modeling-other-conversational-curiosity
20
+ ---
21
+
22
+ # Dataset Card for Curiosity Dataset
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+
47
+ ## Dataset Description
48
+
49
+ - **Homepage:** [Pedro.ai](https://www.pedro.ai/curiosity)
50
+ - **Repository:**
51
+ - **Paper:** [Aclweb](https://www.aclweb.org/anthology/2020.emnlp-main.655/)
52
+ - **Leaderboard:**
53
+ - **Point of Contact:**
54
+
55
+ ### Dataset Summary
56
+
57
+ [More Information Needed]
58
+
59
+ ### Supported Tasks and Leaderboards
60
+
61
+ [More Information Needed]
62
+
63
+ ### Languages
64
+
65
+ [More Information Needed]
66
+
67
+ ## Dataset Structure
68
+
69
+ ### Data Instances
70
+
71
+ [More Information Needed]
72
+
73
+ ### Data Fields
74
+
75
+ [More Information Needed]
76
+
77
+ ### Data Splits
78
+
79
+ [More Information Needed]
80
+
81
+ ## Dataset Creation
82
+
83
+ ### Curation Rationale
84
+
85
+ [More Information Needed]
86
+
87
+ ### Source Data
88
+
89
+ #### Initial Data Collection and Normalization
90
+
91
+ [More Information Needed]
92
+
93
+ #### Who are the source language producers?
94
+
95
+ [More Information Needed]
96
+
97
+ ### Annotations
98
+
99
+ #### Annotation process
100
+
101
+ [More Information Needed]
102
+
103
+ #### Who are the annotators?
104
+
105
+ [More Information Needed]
106
+
107
+ ### Personal and Sensitive Information
108
+
109
+ [More Information Needed]
110
+
111
+ ## Considerations for Using the Data
112
+
113
+ ### Social Impact of Dataset
114
+
115
+ [More Information Needed]
116
+
117
+ ### Discussion of Biases
118
+
119
+ [More Information Needed]
120
+
121
+ ### Other Known Limitations
122
+
123
+ [More Information Needed]
124
+
125
+ ## Additional Information
126
+
127
+ ### Dataset Curators
128
+
129
+ [More Information Needed]
130
+
131
+ ### Licensing Information
132
+
133
+ [More Information Needed]
134
+
135
+ ### Citation Information
136
+
137
+ [More Information Needed]
curiosity_dialogs.py ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """Information Seeking in the Spirit of Learning: a Dataset for Conversational Curiosity"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import json
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @inproceedings{rodriguez2020curiosity,
27
+ title = {Information Seeking in the Spirit of Learning: a Dataset for Conversational Curiosity},
28
+ author = {Pedro Rodriguez and Paul Crook and Seungwhan Moon and Zhiguang Wang},
29
+ year = 2020,
30
+ booktitle = {Empirical Methods in Natural Language Processing}
31
+ }
32
+ """
33
+
34
+
35
+ _DESCRIPTION = """\
36
+ This dataset contains 14K dialogs (181K utterances) where users and assistants converse about geographic topics like
37
+ geopolitical entities and locations. This dataset is annotated with pre-existing user knowledge, message-level dialog
38
+ acts, grounding to Wikipedia, and user reactions to messages.
39
+ """
40
+
41
+ _HOMEPAGE = "https://www.pedro.ai/curiosity"
42
+
43
+ _LICENSE = "https://github.com/facebookresearch/curiosity/blob/master/LICENSE"
44
+
45
+ _URL = "https://obj.umiacs.umd.edu/curiosity/"
46
+ _URLs = {
47
+ "train": _URL + "curiosity_dialogs.train.json",
48
+ "val": _URL + "curiosity_dialogs.val.json",
49
+ "test": _URL + "curiosity_dialogs.test.json",
50
+ "test_zero": _URL + "curiosity_dialogs.test_zero.json",
51
+ }
52
+
53
+
54
+ class CuriosityDialogsConfig(datasets.BuilderConfig):
55
+ """BuilderConfig for Curiosity Dialogs dataset"""
56
+
57
+ def __init__(self, **kwargs):
58
+ """BuilderConfig for Curiosity Dialogs dataset.
59
+ Args:
60
+ **kwargs: keyword arguments forwarded to super.
61
+ """
62
+ super(CuriosityDialogsConfig, self).__init__(**kwargs)
63
+
64
+
65
+ class CuriosityDialogs(datasets.GeneratorBasedBuilder):
66
+ """Information Seeking in the Spirit of Learning: a Dataset for Conversational Curiosity"""
67
+
68
+ VERSION = datasets.Version("1.1.0")
69
+
70
+ BUILDER_CONFIGS = [
71
+ CuriosityDialogsConfig(
72
+ name="curiosity_dialogs",
73
+ version=datasets.Version("1.1.0"),
74
+ description="Curiosity Dialog: A Dataset for Conversational Curiosity",
75
+ ),
76
+ ]
77
+
78
+ def _info(self):
79
+ return datasets.DatasetInfo(
80
+ description=_DESCRIPTION,
81
+ features=datasets.Features(
82
+ {
83
+ "messages": datasets.Sequence(
84
+ {
85
+ "message": datasets.Value("string"),
86
+ "liked": datasets.ClassLabel(names=["False", "True"]),
87
+ "sender": datasets.ClassLabel(names=["user", "assistant"]),
88
+ "facts": datasets.Sequence(
89
+ {
90
+ "fid": datasets.Value("int32"),
91
+ "used": datasets.ClassLabel(names=["False", "True"]),
92
+ "source": datasets.ClassLabel(names=["section", "known", "random"]),
93
+ }
94
+ ),
95
+ "message_id": datasets.Value("string"),
96
+ "dialog_acts": datasets.Sequence(datasets.Value("string")),
97
+ }
98
+ ),
99
+ "known_entities": datasets.Sequence(datasets.Value("string")),
100
+ "focus_entity": datasets.Value("string"),
101
+ "dialog_id": datasets.Value("int32"),
102
+ "inferred_steps": datasets.ClassLabel(names=["False", "True"]),
103
+ "created_time": datasets.Value("int64"),
104
+ "aspects": datasets.Sequence(datasets.Value("string")),
105
+ "first_aspect": datasets.Value("string"),
106
+ "second_aspect": datasets.Value("string"),
107
+ "shuffle_facts": datasets.ClassLabel(names=["False", "True"]),
108
+ "related_entities": datasets.Sequence(datasets.Value("string")),
109
+ "tag": datasets.Value("string"),
110
+ "user_id": datasets.Value("int32"),
111
+ "assistant_id": datasets.Value("int32"),
112
+ "is_annotated": datasets.ClassLabel(names=["False", "True"]),
113
+ "user_dialog_rating": datasets.Value("int32"),
114
+ "user_other_agent_rating": datasets.Value("int32"),
115
+ "assistant_dialog_rating": datasets.Value("int32"),
116
+ "assistant_other_agent_rating": datasets.Value("int32"),
117
+ "reported": datasets.ClassLabel(names=["False", "True"]),
118
+ "annotated": datasets.ClassLabel(names=["False", "True"]),
119
+ }
120
+ ),
121
+ supervised_keys=None,
122
+ homepage=_HOMEPAGE,
123
+ license=_LICENSE,
124
+ citation=_CITATION,
125
+ )
126
+
127
+ def _split_generators(self, dl_manager):
128
+ """Returns SplitGenerators."""
129
+
130
+ data_dir = dl_manager.download_and_extract(_URLs)
131
+ return [
132
+ datasets.SplitGenerator(
133
+ name="train",
134
+ gen_kwargs={
135
+ "filepath": os.path.join(data_dir["train"]),
136
+ "split": "train",
137
+ },
138
+ ),
139
+ datasets.SplitGenerator(
140
+ name="val",
141
+ gen_kwargs={"filepath": os.path.join(data_dir["val"]), "split": "val"},
142
+ ),
143
+ datasets.SplitGenerator(
144
+ name="test",
145
+ gen_kwargs={
146
+ "filepath": os.path.join(data_dir["test"]),
147
+ "split": "test_zero",
148
+ },
149
+ ),
150
+ datasets.SplitGenerator(
151
+ name="test_zero",
152
+ gen_kwargs={
153
+ "filepath": os.path.join(data_dir["test_zero"]),
154
+ "split": "test_zero",
155
+ },
156
+ ),
157
+ ]
158
+
159
+ def _generate_examples(self, filepath, split):
160
+ """ Yields examples. """
161
+
162
+ # Bool entries are converted to string entries because of PyArrow error
163
+ with open(filepath, encoding="utf-8") as f:
164
+ dataset = json.load(f)
165
+ dialogs = dataset["dialogs"]
166
+
167
+ for id_, data in enumerate(dialogs):
168
+ messages = data["messages"]
169
+
170
+ for message in messages:
171
+ message["liked"] = str(message["liked"])
172
+ facts = message["facts"]
173
+
174
+ for fact in facts:
175
+ fact["used"] = str(fact["used"])
176
+
177
+ known_entities = data["known_entities"]
178
+ focus_entity = data["focus_entity"]
179
+ dialog_id = data["dialog_id"]
180
+ inferred_steps = str(data["inferred_steps"])
181
+ created_time = data["created_time"]
182
+ aspects = data["aspects"]
183
+ first_aspect = data["first_aspect"]
184
+ second_aspect = data["second_aspect"]
185
+ shuffle_facts = str(data["shuffle_facts"])
186
+ related_entities = data["related_entities"]
187
+ tag = data["tag"]
188
+ user_id = data["user_id"]
189
+ assistant_id = data["assistant_id"]
190
+ is_annotated = str(data["is_annotated"])
191
+ user_dialog_rating = data["user_dialog_rating"]
192
+ user_other_agent_rating = data["user_other_agent_rating"]
193
+ assistant_dialog_rating = data["assistant_dialog_rating"]
194
+ assistant_other_agent_rating = data["assistant_other_agent_rating"]
195
+ reported = str(data["reported"])
196
+ annotated = str(data["annotated"])
197
+
198
+ yield id_, {
199
+ "messages": messages,
200
+ "known_entities": known_entities,
201
+ "focus_entity": focus_entity,
202
+ "dialog_id": dialog_id,
203
+ "inferred_steps": inferred_steps,
204
+ "created_time": created_time,
205
+ "aspects": aspects,
206
+ "first_aspect": first_aspect,
207
+ "second_aspect": second_aspect,
208
+ "shuffle_facts": shuffle_facts,
209
+ "related_entities": related_entities,
210
+ "tag": tag,
211
+ "user_id": user_id,
212
+ "assistant_id": assistant_id,
213
+ "is_annotated": is_annotated,
214
+ "user_dialog_rating": user_dialog_rating,
215
+ "user_other_agent_rating": user_other_agent_rating,
216
+ "assistant_dialog_rating": assistant_dialog_rating,
217
+ "assistant_other_agent_rating": assistant_other_agent_rating,
218
+ "reported": reported,
219
+ "annotated": annotated,
220
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"curiosity_dialogs": {"description": "This dataset contains 14K dialogs (181K utterances) where users and assistants converse about geographic topics like\ngeopolitical entities and locations. This dataset is annotated with pre-existing user knowledge, message-level dialog\nacts, grounding to Wikipedia, and user reactions to messages.\n", "citation": "@inproceedings{rodriguez2020curiosity,\n title = {Information Seeking in the Spirit of Learning: a Dataset for Conversational Curiosity},\n author = {Pedro Rodriguez and Paul Crook and Seungwhan Moon and Zhiguang Wang},\n year = 2020,\n booktitle = {Empirical Methods in Natural Language Processing}\n}\n", "homepage": "https://www.pedro.ai/curiosity", "license": "https://github.com/facebookresearch/curiosity/blob/master/LICENSE", "features": {"messages": {"feature": {"message": {"dtype": "string", "id": null, "_type": "Value"}, "liked": {"num_classes": 2, "names": ["False", "True"], "names_file": null, "id": null, "_type": "ClassLabel"}, "sender": {"num_classes": 2, "names": ["user", "assistant"], "names_file": null, "id": null, "_type": "ClassLabel"}, "facts": {"feature": {"fid": {"dtype": "int32", "id": null, "_type": "Value"}, "used": {"num_classes": 2, "names": ["False", "True"], "names_file": null, "id": null, "_type": "ClassLabel"}, "source": {"num_classes": 3, "names": ["section", "known", "random"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "length": -1, "id": null, "_type": "Sequence"}, "message_id": {"dtype": "string", "id": null, "_type": "Value"}, "dialog_acts": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}, "known_entities": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "focus_entity": {"dtype": "string", "id": null, "_type": "Value"}, "dialog_id": {"dtype": "int32", "id": null, "_type": "Value"}, "inferred_steps": {"num_classes": 2, "names": ["False", "True"], "names_file": null, "id": null, "_type": "ClassLabel"}, "created_time": {"dtype": "int64", "id": null, "_type": "Value"}, "aspects": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "first_aspect": {"dtype": "string", "id": null, "_type": "Value"}, "second_aspect": {"dtype": "string", "id": null, "_type": "Value"}, "shuffle_facts": {"num_classes": 2, "names": ["False", "True"], "names_file": null, "id": null, "_type": "ClassLabel"}, "related_entities": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "tag": {"dtype": "string", "id": null, "_type": "Value"}, "user_id": {"dtype": "int32", "id": null, "_type": "Value"}, "assistant_id": {"dtype": "int32", "id": null, "_type": "Value"}, "is_annotated": {"num_classes": 2, "names": ["False", "True"], "names_file": null, "id": null, "_type": "ClassLabel"}, "user_dialog_rating": {"dtype": "int32", "id": null, "_type": "Value"}, "user_other_agent_rating": {"dtype": "int32", "id": null, "_type": "Value"}, "assistant_dialog_rating": {"dtype": "int32", "id": null, "_type": "Value"}, "assistant_other_agent_rating": {"dtype": "int32", "id": null, "_type": "Value"}, "reported": {"num_classes": 2, "names": ["False", "True"], "names_file": null, "id": null, "_type": "ClassLabel"}, "annotated": {"num_classes": 2, "names": ["False", "True"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "curiosity_dialogs", "config_name": "curiosity_dialogs", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 37198297, "num_examples": 10287, "dataset_name": "curiosity_dialogs"}, "val": {"name": "val", "num_bytes": 4914487, "num_examples": 1287, "dataset_name": "curiosity_dialogs"}, "test": {"name": "test", "num_bytes": 4915613, "num_examples": 1287, "dataset_name": "curiosity_dialogs"}, "test_zero": {"name": "test_zero", "num_bytes": 4333191, "num_examples": 1187, "dataset_name": "curiosity_dialogs"}}, "download_checksums": {"https://obj.umiacs.umd.edu/curiosity/curiosity_dialogs.train.json": {"num_bytes": 66851161, "checksum": "afe5bb0db8406663a316cd02cd25f33214725aaf1e25137cac3a13c6b1b4e70b"}, "https://obj.umiacs.umd.edu/curiosity/curiosity_dialogs.val.json": {"num_bytes": 8772171, "checksum": "4371152e4c783db3fd7366cee6aac0537fa786180a19d48f1ec052181678214f"}, "https://obj.umiacs.umd.edu/curiosity/curiosity_dialogs.test.json": {"num_bytes": 8771731, "checksum": "61dda16362474488c110a4a7d40da1fd7c6fd3c62dddbedea5e3e1fa590e416d"}, "https://obj.umiacs.umd.edu/curiosity/curiosity_dialogs.test_zero.json": {"num_bytes": 7774102, "checksum": "71f9645727393371ba278311fd2bba70a7e469dbafe5afbea90a2ffd7658ee0c"}}, "download_size": 92169165, "post_processing_size": null, "dataset_size": 51361588, "size_in_bytes": 143530753}}
dummy/curiosity_dialogs/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e97f0b3d674ead026a5d2dcab3da83e08f562dd008d61fc8beb33820774598ca
3
+ size 7409