Commit ·
55383da
1
Parent(s): 43dd535
Update parquet files
Browse files- test.jsonl → SetFit--amazon_polarity/json-test.parquet +2 -2
- train.jsonl → SetFit--amazon_polarity/json-train-00000-of-00004.parquet +2 -2
- SetFit--amazon_polarity/json-train-00001-of-00004.parquet +3 -0
- SetFit--amazon_polarity/json-train-00002-of-00004.parquet +3 -0
- SetFit--amazon_polarity/json-train-00003-of-00004.parquet +3 -0
- create_dataset.py +0 -15
test.jsonl → SetFit--amazon_polarity/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:1787581848f77d0e09b6dd89531d46620ab11d7df8b90035795533b630d4c54f
|
| 3 |
+
size 117655334
|
train.jsonl → SetFit--amazon_polarity/json-train-00000-of-00004.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:13c35b3329b2502d2b09cd50cd00f11e0941977358e77c0aa1a359ab59fb4d14
|
| 3 |
+
size 313874101
|
SetFit--amazon_polarity/json-train-00001-of-00004.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ea74de485b17bbd60e0bce834b2fe5af6e961c5a87ed65cd536d2d91616a5346
|
| 3 |
+
size 314038178
|
SetFit--amazon_polarity/json-train-00002-of-00004.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02f4a3c5c9b062e43b2b56d54ed6a227621ee01ec63190ceefc9211020a2c057
|
| 3 |
+
size 313617817
|
SetFit--amazon_polarity/json-train-00003-of-00004.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3322fa1a7740f052b55458d3a9cc23072a7474647589c2dc4791a20b3b168874
|
| 3 |
+
size 88367574
|
create_dataset.py
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
from datasets import load_dataset
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
def main():
|
| 5 |
-
id2label = {0: "negative", 1: "positive"}
|
| 6 |
-
raw_dset = load_dataset("amazon_polarity")
|
| 7 |
-
|
| 8 |
-
for split, dset in raw_dset.items():
|
| 9 |
-
dset = dset.rename_column("content", "text")
|
| 10 |
-
dset = dset.map(lambda x: {"label_text": id2label[x["label"]]}, num_proc=4)
|
| 11 |
-
dset.to_json(f"{split}.jsonl")
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
if __name__ == "__main__":
|
| 15 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|