Commit
·
c35d333
1
Parent(s):
90524fa
Add GitHub subset (#8)
Browse files- Add GitHub subset (c74fc6f4193258815a95d057ce0edfeba8cc6e05)
- Add description of GitHub subset. (34a7dd03ba4b264f5b74ed7a9891ca566ec02000)
Co-authored-by: André Storhaug <[email protected]>
- README.md +13 -0
- the_pile.py +9 -1
README.md
CHANGED
|
@@ -158,6 +158,14 @@ This dataset is in English (`EN`).
|
|
| 158 |
}
|
| 159 |
```
|
| 160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
### Data Fields
|
| 162 |
|
| 163 |
#### all
|
|
@@ -212,6 +220,11 @@ This dataset is in English (`EN`).
|
|
| 212 |
- `meta` (str): Metadata of the data instance with: bibliographic_information, source_file, abstract, classifications,
|
| 213 |
inventors.
|
| 214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
### Data Splits
|
| 216 |
|
| 217 |
The "all" configuration is composed of 3 splits: train, validation and test.
|
|
|
|
| 158 |
}
|
| 159 |
```
|
| 160 |
|
| 161 |
+
#### github
|
| 162 |
+
```
|
| 163 |
+
{
|
| 164 |
+
'text': "/* filesystem.c\n * Filesystem utility routines\n *\n * Wireshark - Network traffic analyzer\n * By Gerald Combs <[email protected]>\n * Copyright 1998 Gerald Combs\n *\n * SPDX-License-Identifier: GPL-2.0-or-later\n */\n\n#include <config.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <errno.h>\n\n#include <glib.h>...",
|
| 165 |
+
'meta': "{'repo_name': 'wireshark/wireshark', 'stars': '2789', 'repo_language': 'C', 'file_name': 'packet-mpeg-audio-template.c', 'mime_type': 'text/x-c'}"
|
| 166 |
+
}
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
### Data Fields
|
| 170 |
|
| 171 |
#### all
|
|
|
|
| 220 |
- `meta` (str): Metadata of the data instance with: bibliographic_information, source_file, abstract, classifications,
|
| 221 |
inventors.
|
| 222 |
|
| 223 |
+
#### github
|
| 224 |
+
|
| 225 |
+
- `text` (str): Text.
|
| 226 |
+
- `meta` (str): Metadata of the data instance with: repo_name, stars, repo_language, file_name, mime_type.
|
| 227 |
+
|
| 228 |
### Data Splits
|
| 229 |
|
| 230 |
The "all" configuration is composed of 3 splits: train, validation and test.
|
the_pile.py
CHANGED
|
@@ -48,6 +48,7 @@ _LICENSES = {
|
|
| 48 |
"pubmed_central": "Unknown",
|
| 49 |
"ubuntu_irc": "Unknown",
|
| 50 |
"uspto": "Unknown",
|
|
|
|
| 51 |
}
|
| 52 |
|
| 53 |
_HOST_URL = "https://the-eye.eu"
|
|
@@ -66,6 +67,7 @@ _DATA_URLS = {
|
|
| 66 |
"pubmed_central": f"{_HOST_URL}/public/AI/pile_preliminary_components/PMC_extracts.tar.gz",
|
| 67 |
"ubuntu_irc": f"{_HOST_URL}/public/AI/pile_preliminary_components/ubuntu_irc_until_2020_9_1.jsonl.zst",
|
| 68 |
"uspto": f"{_HOST_URL}/public/AI/pile_preliminary_components/pile_uspto.tar",
|
|
|
|
| 69 |
}
|
| 70 |
|
| 71 |
_FEATURES = {
|
|
@@ -129,6 +131,12 @@ _FEATURES = {
|
|
| 129 |
"meta": datasets.Value("string"),
|
| 130 |
}
|
| 131 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
}
|
| 133 |
|
| 134 |
|
|
@@ -243,7 +251,7 @@ class ThePile(datasets.GeneratorBasedBuilder):
|
|
| 243 |
"meta": meta,
|
| 244 |
}
|
| 245 |
key += 1
|
| 246 |
-
elif subset
|
| 247 |
import zstandard as zstd
|
| 248 |
|
| 249 |
for path, file in files[subset]:
|
|
|
|
| 48 |
"pubmed_central": "Unknown",
|
| 49 |
"ubuntu_irc": "Unknown",
|
| 50 |
"uspto": "Unknown",
|
| 51 |
+
"github": "Unknown",
|
| 52 |
}
|
| 53 |
|
| 54 |
_HOST_URL = "https://the-eye.eu"
|
|
|
|
| 67 |
"pubmed_central": f"{_HOST_URL}/public/AI/pile_preliminary_components/PMC_extracts.tar.gz",
|
| 68 |
"ubuntu_irc": f"{_HOST_URL}/public/AI/pile_preliminary_components/ubuntu_irc_until_2020_9_1.jsonl.zst",
|
| 69 |
"uspto": f"{_HOST_URL}/public/AI/pile_preliminary_components/pile_uspto.tar",
|
| 70 |
+
"github": f"{_HOST_URL}/public/AI/pile_preliminary_components/github.tar",
|
| 71 |
}
|
| 72 |
|
| 73 |
_FEATURES = {
|
|
|
|
| 131 |
"meta": datasets.Value("string"),
|
| 132 |
}
|
| 133 |
),
|
| 134 |
+
"github": datasets.Features(
|
| 135 |
+
{
|
| 136 |
+
"text": datasets.Value("string"),
|
| 137 |
+
"meta": datasets.Value("string"),
|
| 138 |
+
}
|
| 139 |
+
),
|
| 140 |
}
|
| 141 |
|
| 142 |
|
|
|
|
| 251 |
"meta": meta,
|
| 252 |
}
|
| 253 |
key += 1
|
| 254 |
+
elif subset in {"uspto", "github"}:
|
| 255 |
import zstandard as zstd
|
| 256 |
|
| 257 |
for path, file in files[subset]:
|