Commit
•
cc4fbda
1
Parent(s):
f1b9129
Update parquet files
Browse files
.gitattributes
DELETED
@@ -1,28 +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 |
-
*.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
|
28 |
-
*.jsonl filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
This is a version of the [20 newsgroups dataset](https://scikit-learn.org/0.19/datasets/twenty_newsgroups.html#the-20-newsgroups-text-dataset) that is provided in Scikit-learn. From the Scikit-learn docs:
|
2 |
-
|
3 |
-
> The 20 newsgroups dataset comprises around 18000 newsgroups posts on 20 topics split in two subsets: one for training (or development) and the other one for testing (or for performance evaluation). The split between the train and test set is based upon a messages posted before and after a specific date.
|
4 |
-
|
5 |
-
We followed the [recommended practice](https://scikit-learn.org/0.19/datasets/twenty_newsgroups.html#filtering-text-for-more-realistic-training) to remove headers, signature blocks, and quotations from each news article.
|
|
|
|
|
|
|
|
|
|
|
|
test.jsonl → SetFit--20_newsgroups/json-test.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:14c4cb15a839bada9f9cf48f1768acbe2be6e1b177dc3e0c11b2b4f67599c42c
|
3 |
+
size 5473122
|
train.jsonl → SetFit--20_newsgroups/json-train.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ed91a6aaeaeb7e348e4bfa3383a847510d0aa8446e40bda60e61015733dc677d
|
3 |
+
size 8903913
|
create_dataset.py
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
from datasets import Dataset
|
2 |
-
from sklearn.datasets import fetch_20newsgroups
|
3 |
-
|
4 |
-
|
5 |
-
def main():
|
6 |
-
for split in ["train", "test"]:
|
7 |
-
# Follow recommendation to strip newsgroup metadata
|
8 |
-
# https://scikit-learn.org/0.19/datasets/twenty_newsgroups.html#filtering-text-for-more-realistic-training
|
9 |
-
data = fetch_20newsgroups(subset=split, remove=("headers", "footers", "quotes"))
|
10 |
-
id2label = {idx: label for idx, label in enumerate(data["target_names"])}
|
11 |
-
d = {"text": data["data"], "label": data["target"]}
|
12 |
-
dset = Dataset.from_dict(d)
|
13 |
-
dset = dset.map(lambda x: {"label_text": id2label[x["label"]]})
|
14 |
-
dset.to_json(f"{split}.jsonl")
|
15 |
-
|
16 |
-
|
17 |
-
if __name__ == "__main__":
|
18 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|