delete unnecesary files
Browse files- create_policies_data.py +0 -28
create_policies_data.py
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
from datasets import load_dataset, DatasetDict
|
2 |
-
dataset_config = {
|
3 |
-
"LOADING_SCRIPT_FILES": "policies.py",
|
4 |
-
"CONFIG_NAME": "plain_text",
|
5 |
-
"DATA_DIR": "data",
|
6 |
-
"CACHE_DIR": "cache_policies",
|
7 |
-
}
|
8 |
-
|
9 |
-
ds = load_dataset(
|
10 |
-
dataset_config["LOADING_SCRIPT_FILES"],
|
11 |
-
dataset_config["CONFIG_NAME"],
|
12 |
-
data_dir=dataset_config["DATA_DIR"],
|
13 |
-
cache_dir=dataset_config["CACHE_DIR"]
|
14 |
-
)
|
15 |
-
|
16 |
-
# 90% train, 10% test + validation
|
17 |
-
# Split the 10% test + valid in half test, half valid
|
18 |
-
train_testvalid = ds["train"].train_test_split(shuffle=True, test_size=0.1)
|
19 |
-
test_valid = train_testvalid["test"].train_test_split(
|
20 |
-
test_size=0.5) # gather everything into a single DatasetDict
|
21 |
-
ds = DatasetDict({
|
22 |
-
"train": train_testvalid["train"],
|
23 |
-
"test": test_valid["test"],
|
24 |
-
"val": test_valid["train"],
|
25 |
-
}
|
26 |
-
)
|
27 |
-
|
28 |
-
print(ds)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|