plaguss commited on
Commit
b63d5e5
·
1 Parent(s): 41976a1

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +17 -100
README.md CHANGED
@@ -4,53 +4,6 @@ tags:
4
  - rlfh
5
  - argilla
6
  - human-feedback
7
- dataset_info:
8
- features:
9
- - name: text
10
- dtype: string
11
- id: field
12
- - name: label
13
- list:
14
- - name: user_id
15
- dtype: string
16
- id: question
17
- - name: value
18
- sequence: string
19
- id: suggestion
20
- - name: status
21
- dtype: string
22
- id: question
23
- - name: label-suggestion
24
- sequence: string
25
- id: suggestion
26
- - name: label-suggestion-metadata
27
- struct:
28
- - name: type
29
- dtype: string
30
- id: suggestion-metadata
31
- - name: score
32
- dtype: float32
33
- id: suggestion-metadata
34
- - name: agent
35
- dtype: string
36
- id: suggestion-metadata
37
- - name: external_id
38
- dtype: string
39
- id: external_id
40
- - name: metadata
41
- dtype: string
42
- id: metadata
43
- splits:
44
- - name: train
45
- num_bytes: 22099606
46
- num_examples: 57732
47
- download_size: 3612505
48
- dataset_size: 22099606
49
- configs:
50
- - config_name: default
51
- data_files:
52
- - split: train
53
- path: data/train-*
54
  ---
55
 
56
  # Dataset Card for go_emotions_raw
@@ -209,7 +162,18 @@ An example of a dataset instance in Argilla looks as follows:
209
  }
210
  }
211
  ],
212
- "suggestions": [],
 
 
 
 
 
 
 
 
 
 
 
213
  "vectors": {}
214
  }
215
  ```
@@ -258,11 +222,14 @@ While the same record in HuggingFace `datasets` looks as follows:
258
  ]
259
  }
260
  ],
261
- "label-suggestion": null,
 
 
 
262
  "label-suggestion-metadata": {
263
  "agent": null,
264
  "score": null,
265
- "type": null
266
  },
267
  "metadata": "{}",
268
  "text": " \"If you don\u0027t wear BROWN AND ORANGE...YOU DON\u0027T MATTER!\" We need a tshirt with that on it asap! "
@@ -298,56 +265,6 @@ The dataset contains a single split, which is `train`.
298
 
299
  ## Dataset Creation
300
 
301
- ### Script to create the dataset
302
-
303
- ```python
304
- import argilla as rg
305
- from datasets import load_dataset
306
- import uuid
307
-
308
- ds = load_dataset("go_emotions", "raw", split="train")
309
-
310
- label_columns = ['admiration', 'amusement', 'anger', 'annoyance', 'approval', 'caring', 'confusion', 'curiosity', 'desire', 'disappointment', 'disapproval', 'disgust', 'embarrassment', 'excitement', 'fear', 'gratitude', 'grief', 'joy', 'love', 'nervousness', 'optimism', 'pride', 'realization', 'relief', 'remorse', 'sadness', 'surprise', 'neutral']
311
-
312
- def add_labels(ex):
313
- labels = []
314
- for label in label_columns:
315
- if ex[label] == 1:
316
- labels.append(label)
317
- ex["labels"] = labels
318
-
319
- return ex
320
-
321
- df = ds.map(add_labels).select_columns(["text", "labels", "rater_id"]).to_pandas()
322
-
323
- feedback_dataset = rg.FeedbackDataset.for_text_classification(labels=label_columns, multi_label=True)
324
-
325
- records = []
326
- for text, df_text in df.groupby("text"):
327
- responses = []
328
- for rater_id, df_raters in df_text.groupby("rater_id"):
329
- responses.append(
330
- {
331
- "values": {"label": {"value": df_raters["labels"].iloc[0].tolist()}},
332
- "status": "submitted",
333
- "user_id": uuid.UUID(int=rater_id),
334
- }
335
- )
336
- records.append(
337
- rg.FeedbackRecord(
338
- fields={"text": df_raters["text"].iloc[0]},
339
- responses=responses,
340
- )
341
- )
342
-
343
-
344
- feedback_dataset.add_records(records)
345
-
346
-
347
- feedback_dataset.push_to_huggingface("plaguss/go_emotions_raw")
348
- ```
349
-
350
-
351
  ### Curation Rationale
352
 
353
  [More Information Needed]
 
4
  - rlfh
5
  - argilla
6
  - human-feedback
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  ---
8
 
9
  # Dataset Card for go_emotions_raw
 
162
  }
163
  }
164
  ],
165
+ "suggestions": [
166
+ {
167
+ "agent": null,
168
+ "question_name": "label",
169
+ "score": null,
170
+ "type": "human",
171
+ "value": [
172
+ "annoyance",
173
+ "neutral"
174
+ ]
175
+ }
176
+ ],
177
  "vectors": {}
178
  }
179
  ```
 
222
  ]
223
  }
224
  ],
225
+ "label-suggestion": [
226
+ "annoyance",
227
+ "neutral"
228
+ ],
229
  "label-suggestion-metadata": {
230
  "agent": null,
231
  "score": null,
232
+ "type": "human"
233
  },
234
  "metadata": "{}",
235
  "text": " \"If you don\u0027t wear BROWN AND ORANGE...YOU DON\u0027T MATTER!\" We need a tshirt with that on it asap! "
 
265
 
266
  ## Dataset Creation
267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  ### Curation Rationale
269
 
270
  [More Information Needed]