rdiehlmartinez commited on
Commit
2d574f4
1 Parent(s): 4fef89f

explicitly adding all filenames instead of globbing

Browse files
Files changed (1) hide show
  1. BabyLM.py +16 -5
BabyLM.py CHANGED
@@ -10,6 +10,19 @@ roughly the amount of text and speech data a young child observes.
10
 
11
  _HOMEPAGE = "https://babylm.github.io"
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  class BabyLM(datasets.GeneratorBasedBuilder):
14
 
15
  BUILDER_CONFIGS = [
@@ -17,13 +30,11 @@ class BabyLM(datasets.GeneratorBasedBuilder):
17
  name="strict_small",
18
  description="Small version of the dataset with 10M words",
19
  version="1.0.0",
20
- data_dir="10M",
21
  ),
22
  datasets.BuilderConfig(
23
  name="strict",
24
  description="Full version of the dataset with 100M words",
25
  version="1.0.0",
26
- data_dir="100M",
27
  )
28
  ]
29
 
@@ -54,9 +65,9 @@ class BabyLM(datasets.GeneratorBasedBuilder):
54
  train_data_dir = "100M"
55
 
56
  urls_to_download = {
57
- "train": f"{train_data_dir}/*.txt",
58
- "dev": "dev/*.txt",
59
- "test": "test/*.txt"
60
  }
61
 
62
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
 
10
 
11
  _HOMEPAGE = "https://babylm.github.io"
12
 
13
+ filenames = [
14
+ "aochildes.txt",
15
+ "bnc_spoken.txt",
16
+ "cbt.txt",
17
+ "children_stories.txt",
18
+ "gutenberg.txt",
19
+ "open_subtitles.txt",
20
+ "qed.txt",
21
+ "simple_wikipedia.txt",
22
+ "switchboard.txt",
23
+ "wikipedia.txt"
24
+ ]
25
+
26
  class BabyLM(datasets.GeneratorBasedBuilder):
27
 
28
  BUILDER_CONFIGS = [
 
30
  name="strict_small",
31
  description="Small version of the dataset with 10M words",
32
  version="1.0.0",
 
33
  ),
34
  datasets.BuilderConfig(
35
  name="strict",
36
  description="Full version of the dataset with 100M words",
37
  version="1.0.0",
 
38
  )
39
  ]
40
 
 
65
  train_data_dir = "100M"
66
 
67
  urls_to_download = {
68
+ "train": [f"{train_data_dir}/{fn}" for fn in filenames],
69
+ "dev": [f"dev/{fn}" for fn in filenames],
70
+ "test": [f"test/{fn}" for fn in filenames]
71
  }
72
 
73
  downloaded_files = dl_manager.download_and_extract(urls_to_download)