parquet-converter commited on
Commit
bca33e0
1 Parent(s): fbd6fcc

Update parquet files

Browse files
.gitattributes DELETED
@@ -1,38 +0,0 @@
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
- *.wasm filter=lfs diff=lfs merge=lfs -text
25
- *.xz filter=lfs diff=lfs merge=lfs -text
26
- *.zip filter=lfs diff=lfs merge=lfs -text
27
- *.zstandard filter=lfs diff=lfs merge=lfs -text
28
- *tfevents* filter=lfs diff=lfs merge=lfs -text
29
- # Audio files - uncompressed
30
- *.pcm filter=lfs diff=lfs merge=lfs -text
31
- *.sam filter=lfs diff=lfs merge=lfs -text
32
- *.raw filter=lfs diff=lfs merge=lfs -text
33
- # Audio files - compressed
34
- *.aac filter=lfs diff=lfs merge=lfs -text
35
- *.flac filter=lfs diff=lfs merge=lfs -text
36
- *.mp3 filter=lfs diff=lfs merge=lfs -text
37
- *.ogg filter=lfs diff=lfs merge=lfs -text
38
- *.wav filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md DELETED
@@ -1,90 +0,0 @@
1
- ## Overview
2
-
3
- Original dataset page [here](https://abhilasharavichander.github.io/NLI_StressTest/) and dataset available [here](https://drive.google.com/open?id=1faGA5pHdu5Co8rFhnXn-6jbBYC2R1dhw).
4
-
5
-
6
- ## Dataset curation
7
- Added new column `label` with encoded labels with the following mapping
8
-
9
- ```
10
- {"entailment": 0, "neutral": 1, "contradiction": 2}
11
- ```
12
-
13
- and the columns with parse information are dropped as they are not well formatted.
14
-
15
- Also, the name of the file from which each instance comes is added in the column `dtype`.
16
-
17
-
18
- ## Code to create the dataset
19
-
20
- ```python
21
- import pandas as pd
22
- from datasets import Dataset, ClassLabel, Value, Features, DatasetDict
23
- import json
24
- from pathlib import Path
25
-
26
-
27
- # load data
28
- ds = {}
29
- path = Path("<path to folder>")
30
- for i in path.rglob("*.jsonl"):
31
- print(i)
32
- name = str(i).split("/")[0].lower()
33
- dtype = str(i).split("/")[1].lower()
34
-
35
- # read data
36
- with i.open("r") as fl:
37
- df = pd.DataFrame([json.loads(line) for line in fl])
38
-
39
- # select columns
40
- df = df.loc[:, ["sentence1", "sentence2", "gold_label"]]
41
-
42
- # add file name as column
43
- df["dtype"] = dtype
44
-
45
- # encode labels
46
- df["label"] = df["gold_label"].map({"entailment": 0, "neutral": 1, "contradiction": 2})
47
- ds[name] = df
48
-
49
- # cast to dataset
50
- features = Features(
51
- {
52
- "sentence1": Value(dtype="string"),
53
- "sentence2": Value(dtype="string"),
54
- "label": ClassLabel(num_classes=3, names=["entailment", "neutral", "contradiction"]),
55
- "dtype": Value(dtype="string"),
56
- "gold_label": Value(dtype="string"),
57
- }
58
- )
59
- ds = DatasetDict({k: Dataset.from_pandas(v, features=features) for k, v in ds.items()})
60
- ds.push_to_hub("pietrolesci/stress_tests_nli", token="<token>")
61
-
62
-
63
- # check overlap between splits
64
- from itertools import combinations
65
- for i, j in combinations(ds.keys(), 2):
66
- print(
67
- f"{i} - {j}: ",
68
- pd.merge(
69
- ds[i].to_pandas(),
70
- ds[j].to_pandas(),
71
- on=["sentence1", "sentence2", "label"],
72
- how="inner",
73
- ).shape[0],
74
- )
75
- #> numerical_reasoning - negation: 0
76
- #> numerical_reasoning - length_mismatch: 0
77
- #> numerical_reasoning - spelling_error: 0
78
- #> numerical_reasoning - word_overlap: 0
79
- #> numerical_reasoning - antonym: 0
80
- #> negation - length_mismatch: 0
81
- #> negation - spelling_error: 0
82
- #> negation - word_overlap: 0
83
- #> negation - antonym: 0
84
- #> length_mismatch - spelling_error: 0
85
- #> length_mismatch - word_overlap: 0
86
- #> length_mismatch - antonym: 0
87
- #> spelling_error - word_overlap: 0
88
- #> spelling_error - antonym: 0
89
- #> word_overlap - antonym: 0
90
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/spelling_error-00000-of-00001.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:5375f8c61c05193f2f7d9e677a5bf696ba007912a0bff89d99eece1559906dc1
3
- size 702710
 
 
 
 
data/word_overlap-00000-of-00001.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:fe0e540b7cd53919bf80facbe20a67cf21cd85990a5dca1a47775c3e5459803a
3
- size 763422
 
 
 
 
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"pietrolesci--stress_tests_nli": {"description": "", "citation": "", "homepage": "", "license": "", "features": {"sentence1": {"dtype": "string", "id": null, "_type": "Value"}, "sentence2": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["entailment", "neutral", "contradiction"], "names_file": null, "id": null, "_type": "ClassLabel"}, "dtype": {"dtype": "string", "id": null, "_type": "Value"}, "gold_label": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": null, "config_name": null, "version": null, "splits": {"numerical_reasoning": {"name": "numerical_reasoning", "num_bytes": 1948042, "num_examples": 7596, "dataset_name": "stress_tests_nli"}, "negation": {"name": "negation", "num_bytes": 2679179, "num_examples": 9832, "dataset_name": "stress_tests_nli"}, "length_mismatch": {"name": "length_mismatch", "num_bytes": 3171889, "num_examples": 9815, "dataset_name": "stress_tests_nli"}, "spelling_error": {"name": "spelling_error", "num_bytes": 2446783, "num_examples": 9137, "dataset_name": "stress_tests_nli"}, "word_overlap": {"name": "word_overlap", "num_bytes": 2600523, "num_examples": 9832, "dataset_name": "stress_tests_nli"}, "antonym": {"name": "antonym", "num_bytes": 446421, "num_examples": 1561, "dataset_name": "stress_tests_nli"}}, "download_checksums": null, "download_size": 3512541, "post_processing_size": null, "dataset_size": 13292837, "size_in_bytes": 16805378}}
 
 
data/negation-00000-of-00001.parquet → pietrolesci--stress_tests_nli/parquet-antonym.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b4b792fb31034113df04a786b3be24813e8b3f943616e6fd664b262ca8166bdd
3
- size 766139
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:867030a4644ecd989dc841f326b008ba4150c26248d4021bbef49f83d6a1b6fc
3
+ size 203498
data/antonym-00000-of-00001.parquet → pietrolesci--stress_tests_nli/parquet-length_mismatch.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7203d1348dde6eb1f52721808a0e39efb71b7821eb21b6c66a2886b7e5402bb6
3
- size 195057
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75f7a35a623e73dcb0086ae029af8db73aff42d4b686659961b753e5975b7521
3
+ size 1224957
data/length_mismatch-00000-of-00001.parquet → pietrolesci--stress_tests_nli/parquet-negation.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:88c1d5b88e36b514ae366b1085d418108a7a80dfc279f00999ad101d63302c34
3
- size 723899
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a682d18d8701a76774831876441e80195ab78d6b953609b0aeed2030c5563a81
3
+ size 1249528
data/numerical_reasoning-00000-of-00001.parquet → pietrolesci--stress_tests_nli/parquet-numerical_reasoning.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0bbefe681b39d216c9f11bd5fbfdc6c10419e9918517ea58cb13eaa031be96ac
3
- size 361314
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11d5f356f573239653dbb69aa51ad581cdfd2a0de15752c41157c25e335b541c
3
+ size 408832
pietrolesci--stress_tests_nli/parquet-spelling_error.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82d74f73b8a10c822b1d312a81dec8dcaa34888919d31cc67f207bce46724847
3
+ size 1133942
pietrolesci--stress_tests_nli/parquet-word_overlap.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d01bf779fbad9c18c70e44b8a970dbe4178b6dc10e60a60218bdfc9f47283310
3
+ size 1245994