system HF staff commited on
Commit
43d46be
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,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - crowdsourced
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - cc-by-4-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - conditional-text-generation
18
+ task_ids:
19
+ - conditional-text-generation-other-dialogue-generation
20
+ ---
21
+
22
+
23
+ # Dataset Card for Deal or No Deal Negotiator
24
+
25
+ ## Table of Contents
26
+ - [Dataset Description](#dataset-description)
27
+ - [Dataset Summary](#dataset-summary)
28
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
29
+ - [Languages](#languages)
30
+ - [Dataset Structure](#dataset-structure)
31
+ - [Data Instances](#data-instances)
32
+ - [Data Fields](#data-instances)
33
+ - [Data Splits](#data-instances)
34
+ - [Dataset Creation](#dataset-creation)
35
+ - [Curation Rationale](#curation-rationale)
36
+ - [Source Data](#source-data)
37
+ - [Annotations](#annotations)
38
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
39
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
40
+ - [Social Impact of Dataset](#social-impact-of-dataset)
41
+ - [Discussion of Biases](#discussion-of-biases)
42
+ - [Other Known Limitations](#other-known-limitations)
43
+ - [Additional Information](#additional-information)
44
+ - [Dataset Curators](#dataset-curators)
45
+ - [Licensing Information](#licensing-information)
46
+ - [Citation Information](#citation-information)
47
+
48
+ ## Dataset Description
49
+
50
+ - **Repository:** [Dataset Repository](https://github.com/facebookresearch/end-to-end-negotiator)
51
+ - **Paper:** [Deal or No Deal? End-to-End Learning for Negotiation Dialogues](https://arxiv.org/abs/1706.05125)
52
+
53
+ ### Dataset Summary
54
+
55
+ A large dataset of human-human negotiations on a multi-issue bargaining task, where agents who cannot observe each other’s reward functions must reach an agreement (or a deal) via natural language dialogue.
56
+
57
+ ### Supported Tasks and Leaderboards
58
+
59
+ Train end-to-end models for negotiation
60
+
61
+ ### Languages
62
+
63
+ The text in the dataset is in English
64
+
65
+ ## Dataset Structure
66
+
67
+ ### Data Instances
68
+
69
+ {'dialogue': 'YOU: i love basketball and reading <eos> THEM: no . i want the hat and the balls <eos> YOU: both balls ? <eos> THEM: yeah or 1 ball and 1 book <eos> YOU: ok i want the hat and you can have the rest <eos> THEM: okay deal ill take the books and the balls you can have only the hat <eos> YOU: ok <eos> THEM: <selection>',
70
+ 'input': {'count': [3, 1, 2], 'value': [0, 8, 1]},
71
+ 'output': 'item0=0 item1=1 item2=0 item0=3 item1=0 item2=2',
72
+ 'partner_input': {'count': [3, 1, 2], 'value': [1, 3, 2]}}
73
+
74
+ ### Data Fields
75
+
76
+ `dialogue`: The dialogue between the agents. \
77
+ `input`: The input of the firt agent. \
78
+ `partner_input`: The input of the other agent. \
79
+ `count`: The count of the three available items. \
80
+ `value`: The value of the three available items. \
81
+ `output`: Describes how many of each of the three item typesare assigned to each agent
82
+
83
+
84
+ ### Data Splits
85
+
86
+ | | Tain | Valid | Test |
87
+ | ----- | ------ | ----- | ---- |
88
+ | dialogues | 10095 | 1087 | 1052 |
89
+ | self_play | 8172 | NA | NA |
90
+
91
+ ## Dataset Creation
92
+
93
+ ### Curation Rationale
94
+
95
+ [More Information Needed]
96
+
97
+ ### Source Data
98
+
99
+ #### Initial Data Collection and Normalization
100
+
101
+ [More Information Needed]
102
+
103
+ #### Who are the source language producers?
104
+
105
+ [More Information Needed]
106
+
107
+ ### Annotations
108
+
109
+ #### Annotation process
110
+
111
+ [More Information Needed]
112
+
113
+ #### Who are the annotators?
114
+
115
+ Human workers using Amazon Mechanical Turk. They were paid $0.15 per dialogue, with a $0.05 bonus for maximal scores. Only workers based in the United States with a 95% approval rating and at least 5000 previous HITs were used.
116
+
117
+ ### Personal and Sensitive Information
118
+
119
+ [More Information Needed]
120
+
121
+ ## Considerations for Using the Data
122
+
123
+ ### Social Impact of Dataset
124
+
125
+ [More Information Needed]
126
+
127
+ ### Discussion of Biases
128
+
129
+ [More Information Needed]
130
+
131
+ ### Other Known Limitations
132
+
133
+ [More Information Needed]
134
+
135
+ ## Additional Information
136
+
137
+ ### Dataset Curators
138
+
139
+ [More Information Needed]
140
+
141
+ ### Licensing Information
142
+
143
+ The project is licenced under CC-by-NC
144
+
145
+ ### Citation Information
146
+ ```
147
+ @article{lewis2017deal,
148
+ title={Deal or no deal? end-to-end learning for negotiation dialogues},
149
+ author={Lewis, Mike and Yarats, Denis and Dauphin, Yann N and Parikh, Devi and Batra, Dhruv},
150
+ journal={arXiv preprint arXiv:1706.05125},
151
+ year={2017}
152
+ }
153
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"dialogues": {"description": "A large dataset of human-human negotiations on a multi-issue bargaining task, where agents who cannot observe each other\u2019s reward functions must reach anagreement (o a deal) via natural language dialogue.\n", "citation": "@article{lewis2017deal,\n title={Deal or no deal? end-to-end learning for negotiation dialogues},\n author={Lewis, Mike and Yarats, Denis and Dauphin, Yann N and Parikh, Devi and Batra, Dhruv},\n journal={arXiv preprint arXiv:1706.05125},\n year={2017}\n}\n", "homepage": "https://github.com/facebookresearch/end-to-end-negotiator", "license": "The project is licenced under CC-by-NC", "features": {"input": {"feature": {"count": {"dtype": "int32", "id": null, "_type": "Value"}, "value": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}, "dialogue": {"dtype": "string", "id": null, "_type": "Value"}, "output": {"dtype": "string", "id": null, "_type": "Value"}, "partner_input": {"feature": {"count": {"dtype": "int32", "id": null, "_type": "Value"}, "value": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "deal_or_no_dialog", "config_name": "dialogues", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 3860624, "num_examples": 10095, "dataset_name": "deal_or_no_dialog"}, "test": {"name": "test", "num_bytes": 396258, "num_examples": 1052, "dataset_name": "deal_or_no_dialog"}, "validation": {"name": "validation", "num_bytes": 418491, "num_examples": 1087, "dataset_name": "deal_or_no_dialog"}}, "download_checksums": {"https://raw.githubusercontent.com/facebookresearch/end-to-end-negotiator/master/src/data/negotiate/train.txt": {"num_bytes": 4325861, "checksum": "aa278f06765463a5767055e1a544d922b39a9bb78f586f85513bf99f74aa2300"}, "https://raw.githubusercontent.com/facebookresearch/end-to-end-negotiator/master/src/data/negotiate/test.txt": {"num_bytes": 444703, "checksum": "37be3150bf656195b61a7547b45cf307acce929f2a8140036890a561c3597c83"}, "https://raw.githubusercontent.com/facebookresearch/end-to-end-negotiator/master/src/data/negotiate/val.txt": {"num_bytes": 468508, "checksum": "5ad7df00b8bc4b1fff565cb4dc38b23afc7874c496b0ed2e1c58c232326ff996"}}, "download_size": 5239072, "post_processing_size": null, "dataset_size": 4675373, "size_in_bytes": 9914445}, "self_play": {"description": "A large dataset of human-human negotiations on a multi-issue bargaining task, where agents who cannot observe each other\u2019s reward functions must reach anagreement (o a deal) via natural language dialogue.\n", "citation": "@article{lewis2017deal,\n title={Deal or no deal? end-to-end learning for negotiation dialogues},\n author={Lewis, Mike and Yarats, Denis and Dauphin, Yann N and Parikh, Devi and Batra, Dhruv},\n journal={arXiv preprint arXiv:1706.05125},\n year={2017}\n}\n", "homepage": "https://github.com/facebookresearch/end-to-end-negotiator", "license": "The project is licenced under CC-by-NC", "features": {"input": {"feature": {"count": {"dtype": "int32", "id": null, "_type": "Value"}, "value": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "deal_or_no_dialog", "config_name": "self_play", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 261512, "num_examples": 8172, "dataset_name": "deal_or_no_dialog"}}, "download_checksums": {"https://raw.githubusercontent.com/facebookresearch/end-to-end-negotiator/master/src/data/negotiate/selfplay.txt": {"num_bytes": 98304, "checksum": "05b7d66c309617f0f1a5562ab8c1d2de933e712a4c8419fd924f4a2c899ab3aa"}}, "download_size": 98304, "post_processing_size": null, "dataset_size": 261512, "size_in_bytes": 359816}}
deal_or_no_dialog.py ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """Deal or no deal negotiator"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import datasets
20
+
21
+
22
+ _CITATION = """\
23
+ @article{lewis2017deal,
24
+ title={Deal or no deal? end-to-end learning for negotiation dialogues},
25
+ author={Lewis, Mike and Yarats, Denis and Dauphin, Yann N and Parikh, Devi and Batra, Dhruv},
26
+ journal={arXiv preprint arXiv:1706.05125},
27
+ year={2017}
28
+ }
29
+ """
30
+
31
+ _DESCRIPTION = """\
32
+ A large dataset of human-human negotiations on a multi-issue bargaining task, where agents who cannot observe each other’s reward functions must reach anagreement (o a deal) via natural language dialogue.
33
+ """
34
+
35
+ _HOMEPAGE = "https://github.com/facebookresearch/end-to-end-negotiator"
36
+
37
+ _LICENSE = "The project is licenced under CC-by-NC"
38
+
39
+ _URLs = {
40
+ "train": "https://raw.githubusercontent.com/facebookresearch/end-to-end-negotiator/master/src/data/negotiate/train.txt",
41
+ "test": "https://raw.githubusercontent.com/facebookresearch/end-to-end-negotiator/master/src/data/negotiate/test.txt",
42
+ "val": "https://raw.githubusercontent.com/facebookresearch/end-to-end-negotiator/master/src/data/negotiate/val.txt",
43
+ "selfplay": "https://raw.githubusercontent.com/facebookresearch/end-to-end-negotiator/master/src/data/negotiate/selfplay.txt",
44
+ }
45
+
46
+
47
+ class DealOrNoDialog(datasets.GeneratorBasedBuilder):
48
+ """Deal or no deal negotiator"""
49
+
50
+ VERSION = datasets.Version("1.1.0")
51
+
52
+ BUILDER_CONFIGS = [
53
+ datasets.BuilderConfig(
54
+ name="dialogues",
55
+ description="Consists of 5808 dialogues, based on 2236 unique scenarios.",
56
+ version=VERSION,
57
+ ),
58
+ datasets.BuilderConfig(
59
+ name="self_play", description="Count and values with no dialogues. Used for self playing.", version=VERSION
60
+ ),
61
+ ]
62
+
63
+ DEFAULT_CONFIG_NAME = "dialogues"
64
+
65
+ def _info(self):
66
+ if self.config.name == "dialogues":
67
+ features = datasets.Features(
68
+ {
69
+ "input": datasets.Sequence({"count": datasets.Value("int32"), "value": datasets.Value("int32")}),
70
+ "dialogue": datasets.Value("string"),
71
+ "output": datasets.Value("string"),
72
+ "partner_input": datasets.Sequence(
73
+ {"count": datasets.Value("int32"), "value": datasets.Value("int32")}
74
+ ),
75
+ }
76
+ )
77
+ else: # self_play
78
+ features = datasets.Features(
79
+ {
80
+ "input": datasets.Sequence({"count": datasets.Value("int32"), "value": datasets.Value("int32")}),
81
+ }
82
+ )
83
+ return datasets.DatasetInfo(
84
+ description=_DESCRIPTION,
85
+ features=features,
86
+ supervised_keys=None,
87
+ homepage=_HOMEPAGE,
88
+ license=_LICENSE,
89
+ citation=_CITATION,
90
+ )
91
+
92
+ def _split_generators(self, dl_manager):
93
+ """Returns SplitGenerators."""
94
+ if self.config.name == "dialogues":
95
+ path_train = dl_manager.download_and_extract(_URLs["train"])
96
+ path_test = dl_manager.download_and_extract(_URLs["test"])
97
+ path_val = dl_manager.download_and_extract(_URLs["val"])
98
+
99
+ return [
100
+ datasets.SplitGenerator(
101
+ name=datasets.Split.TRAIN,
102
+ gen_kwargs={
103
+ "filepath": path_train,
104
+ "split": "train",
105
+ },
106
+ ),
107
+ datasets.SplitGenerator(
108
+ name=datasets.Split.TEST,
109
+ gen_kwargs={"filepath": path_test, "split": "test"},
110
+ ),
111
+ datasets.SplitGenerator(
112
+ name=datasets.Split.VALIDATION,
113
+ gen_kwargs={
114
+ "filepath": path_val,
115
+ "split": "val",
116
+ },
117
+ ),
118
+ ]
119
+
120
+ else:
121
+ path = dl_manager.download_and_extract(_URLs["selfplay"])
122
+ return [
123
+ datasets.SplitGenerator(
124
+ name=datasets.Split.TRAIN,
125
+ gen_kwargs={
126
+ "filepath": path,
127
+ "split": "train",
128
+ },
129
+ ),
130
+ ]
131
+
132
+ def _generate_examples(self, filepath, split="train"):
133
+ """ Yields examples. """
134
+ if self.config.name == "dialogues":
135
+ with open(filepath, encoding="utf-8") as f:
136
+ for idx, line in enumerate(f):
137
+ tokens = line.split()
138
+
139
+ yield idx, {
140
+ "input": {
141
+ "count": get_count_value(get_tag(tokens, "input"))[0],
142
+ "value": get_count_value(get_tag(tokens, "input"))[1],
143
+ },
144
+ "dialogue": get_tag(tokens, "dialogue"),
145
+ "output": get_tag(tokens, "output"),
146
+ "partner_input": {
147
+ "count": get_count_value(get_tag(tokens, "partner_input"))[0],
148
+ "value": get_count_value(get_tag(tokens, "partner_input"))[1],
149
+ },
150
+ }
151
+
152
+ else:
153
+ with open(filepath, encoding="utf-8") as f:
154
+ for idx, line in enumerate(f):
155
+ yield idx, {"input": {"count": get_count_value(line)[0], "value": get_count_value(line)[1]}}
156
+
157
+
158
+ def get_tag(tokens, tag):
159
+ return " ".join(tokens[tokens.index("<" + tag + ">") + 1 : tokens.index("</" + tag + ">")])
160
+
161
+
162
+ def get_count_value(sequence):
163
+ seq_list = [int(el) for el in sequence.split()]
164
+ assert len(seq_list) == 6
165
+ return [seq_list[idx] for idx in [0, 2, 4]], [seq_list[idx] for idx in [1, 3, 5]]
dummy/dialogues/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e1f5b98dbac1694fdc4a496b6bb23fb843a1d3bebc9a2adcf46ab0438094f17
3
+ size 1956
dummy/self_play/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48085d0881cceeb8528e29b82a779c6ab78a7211765b2beae62df62afb2251a5
3
+ size 267