SaylorTwift HF Staff commited on
Commit
4ffe6d3
·
verified ·
1 Parent(s): f8f65e2

Delete loading script

Browse files
Files changed (1) hide show
  1. pile_helm.py +0 -75
pile_helm.py DELETED
@@ -1,75 +0,0 @@
1
- import datasets
2
- import os
3
- import json
4
-
5
-
6
- _CITATION = """
7
-
8
- """
9
-
10
- _DESCRIPTION = """
11
-
12
- """
13
-
14
- names = [
15
- "github",
16
- "arxiv",
17
- "wikipedia",
18
- "opensubtitles",
19
- "openwebtext2",
20
- "gutenberg",
21
- "dm-mathematics",
22
- "enron",
23
- "bibliotik",
24
- "pubmed-abstracts",
25
- "youtubesubtitles",
26
- "hackernews",
27
- "commoncrawl",
28
- "europarl",
29
- "uspto",
30
- "freelaw",
31
- "nih-exporter",
32
- "stackexchange",
33
- "pubmed-central",
34
- #"ubuntu-irc", # too small to split 10 ways according to helm code
35
- #"bookcorpus",
36
- #"philpapers",
37
- ]
38
-
39
- class Builder(datasets.GeneratorBasedBuilder):
40
- VERSION = datasets.Version("1.0.0")
41
-
42
- BUILDER_CONFIGS = [
43
- datasets.BuilderConfig(name=name, version=datasets.Version("1.0.0"), description=_DESCRIPTION)
44
- for name in names
45
- ]
46
-
47
- def _info(self):
48
- features = datasets.Features(
49
- {
50
- "text": datasets.Value("string"),
51
- }
52
- )
53
- return datasets.DatasetInfo(
54
- description=_DESCRIPTION,
55
- features=features,
56
- homepage="",
57
- license="",
58
- citation=_CITATION,
59
- )
60
-
61
- def _split_generators(self, dl_manager):
62
- test_json = dl_manager.download(os.path.join(self.config.name, "test.jsonl"))
63
-
64
- return [
65
- datasets.SplitGenerator(
66
- name=datasets.Split.TEST,
67
- gen_kwargs={"path": test_json},
68
- ),
69
- ]
70
-
71
- # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
72
- def _generate_examples(self, path):
73
- with open(path, encoding="utf-8") as f:
74
- for key, row in enumerate(f):
75
- yield key, json.loads(row)