Commit
•
2794082
1
Parent(s):
42c1798
defunct book subset (#28)
Browse files- raise error for 'book' config in script (dd18e8fbe64140d776fa7982a6418224e7addb54)
- delete url file (1cebfa382dba02014619a2ba065c95e0963e144b)
- update readme with the defunct message (b9546d95e56774297ca8ecdd37ff54082ca8a06e)
Co-authored-by: Polina Kazakova <polinaeterna@users.noreply.huggingface.co>
- README.md +6 -2
- RedPajama-Data-1T.py +10 -5
- urls/book.txt +0 -1
README.md
CHANGED
@@ -96,8 +96,12 @@ text in 20 different languages. The dataset comes in preprocessed format, so tha
|
|
96 |
formatting boilerplate has been removed.
|
97 |
|
98 |
#### Gutenberg and Books3
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
101 |
|
102 |
#### ArXiv
|
103 |
ArXiv data is downloaded from Amazon S3 in the `arxiv` requester pays bucket. We only keep latex source files and
|
|
|
96 |
formatting boilerplate has been removed.
|
97 |
|
98 |
#### Gutenberg and Books3
|
99 |
+
|
100 |
+
|
101 |
+
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
|
102 |
+
<p><b>Defunct:</b> The 'book' config is defunct and no longer accessible due to reported copyright infringement for the Book3 dataset contained in this config.</p>
|
103 |
+
</div>
|
104 |
+
|
105 |
|
106 |
#### ArXiv
|
107 |
ArXiv data is downloaded from Amazon S3 in the `arxiv` requester pays bucket. We only keep latex source files and
|
RedPajama-Data-1T.py
CHANGED
@@ -19,6 +19,7 @@
|
|
19 |
import json
|
20 |
|
21 |
import datasets
|
|
|
22 |
import traceback
|
23 |
import os
|
24 |
|
@@ -31,7 +32,6 @@ RedPajama is a clean-room, fully open-source implementation of the LLaMa dataset
|
|
31 |
|
32 |
_URL_LISTS = {
|
33 |
"arxiv": "urls/arxiv.txt",
|
34 |
-
"book": "urls/book.txt",
|
35 |
"c4": "urls/c4.txt",
|
36 |
"common_crawl": "urls/common_crawl.txt",
|
37 |
"github": "urls/github.txt",
|
@@ -60,7 +60,7 @@ class RedPajama1T(datasets.GeneratorBasedBuilder):
|
|
60 |
BUILDER_CONFIGS = [
|
61 |
RedPajama1TConfig(
|
62 |
name = 'default',
|
63 |
-
subsets = list(_URL_LISTS
|
64 |
version=datasets.Version("1.0.0", ""),
|
65 |
description="RedPajama1T",
|
66 |
),
|
@@ -129,10 +129,15 @@ class RedPajama1T(datasets.GeneratorBasedBuilder):
|
|
129 |
)
|
130 |
|
131 |
def _split_generators(self, dl_manager):
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
url_lists = dl_manager.download_and_extract({
|
133 |
-
subset: _URL_LISTS[subset] for subset in
|
134 |
})
|
135 |
-
|
136 |
urls = {}
|
137 |
|
138 |
for subset, url_list in url_lists.items():
|
@@ -158,7 +163,7 @@ class RedPajama1T(datasets.GeneratorBasedBuilder):
|
|
158 |
gen_kwargs = {
|
159 |
"files": {
|
160 |
subset: downloaded_files[subset]
|
161 |
-
for subset in
|
162 |
}
|
163 |
}
|
164 |
)
|
|
|
19 |
import json
|
20 |
|
21 |
import datasets
|
22 |
+
from datasets.exceptions import DefunctDatasetError
|
23 |
import traceback
|
24 |
import os
|
25 |
|
|
|
32 |
|
33 |
_URL_LISTS = {
|
34 |
"arxiv": "urls/arxiv.txt",
|
|
|
35 |
"c4": "urls/c4.txt",
|
36 |
"common_crawl": "urls/common_crawl.txt",
|
37 |
"github": "urls/github.txt",
|
|
|
60 |
BUILDER_CONFIGS = [
|
61 |
RedPajama1TConfig(
|
62 |
name = 'default',
|
63 |
+
subsets = list(_URL_LISTS) + ["book"],
|
64 |
version=datasets.Version("1.0.0", ""),
|
65 |
description="RedPajama1T",
|
66 |
),
|
|
|
129 |
)
|
130 |
|
131 |
def _split_generators(self, dl_manager):
|
132 |
+
if self.config.name == "book":
|
133 |
+
raise DefunctDatasetError(
|
134 |
+
"The 'book' config is defunct and no longer accessible due to reported copyright infringement. "
|
135 |
+
)
|
136 |
+
subsets = [subset for subset in self.config.subsets if subset != "book"]
|
137 |
+
|
138 |
url_lists = dl_manager.download_and_extract({
|
139 |
+
subset: _URL_LISTS[subset] for subset in subsets
|
140 |
})
|
|
|
141 |
urls = {}
|
142 |
|
143 |
for subset, url_list in url_lists.items():
|
|
|
163 |
gen_kwargs = {
|
164 |
"files": {
|
165 |
subset: downloaded_files[subset]
|
166 |
+
for subset in subsets
|
167 |
}
|
168 |
}
|
169 |
)
|
urls/book.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
https://data.together.xyz/redpajama-data-1T/v1.0.0/book/book.jsonl
|
|
|
|