update
Browse files- the-vault.py +3 -3
the-vault.py
CHANGED
@@ -39,7 +39,7 @@ num_shard_split = {
|
|
39 |
'train/small': 2,
|
40 |
'train/medium': 4
|
41 |
}
|
42 |
-
|
43 |
|
44 |
class TheVaultConfig(datasets.BuilderConfig):
|
45 |
"""BuilderConfig for The Vault dataset."""
|
@@ -59,7 +59,7 @@ class TheVaultConfig(datasets.BuilderConfig):
|
|
59 |
languages = set(languages)
|
60 |
|
61 |
assert all([language in _LANG_CONFIGS for language in languages]), f"languages {languages} contains language not in {_LANG_CONFIGS}."
|
62 |
-
assert all([split in
|
63 |
|
64 |
if "all" in split_set:
|
65 |
assert len(split_set)==1, f"Passed 'all' together with other split sets. {split_set}"
|
@@ -80,7 +80,7 @@ class TheVault(datasets.GeneratorBasedBuilder):
|
|
80 |
VERSION = datasets.Version("1.0.0")
|
81 |
|
82 |
BUILDER_CONFIG_CLASS = TheVaultConfig
|
83 |
-
BUILDER_CONFIGS = [TheVaultConfig(languages=[lang], split_set=spl) for lang in _LANG_CONFIGS for spl in
|
84 |
DEFAULT_CONFIG_NAME = "all-all"
|
85 |
|
86 |
|
|
|
39 |
'train/small': 2,
|
40 |
'train/medium': 4
|
41 |
}
|
42 |
+
_SPLIT_CONFIGS = ["all"] + list(num_shard_split.keys())
|
43 |
|
44 |
class TheVaultConfig(datasets.BuilderConfig):
|
45 |
"""BuilderConfig for The Vault dataset."""
|
|
|
59 |
languages = set(languages)
|
60 |
|
61 |
assert all([language in _LANG_CONFIGS for language in languages]), f"languages {languages} contains language not in {_LANG_CONFIGS}."
|
62 |
+
assert all([split in _SPLIT_CONFIGS for split in split_set]), "split_set {} contains element not in {}.".format(split_set, _SPLIT_CONFIGS)
|
63 |
|
64 |
if "all" in split_set:
|
65 |
assert len(split_set)==1, f"Passed 'all' together with other split sets. {split_set}"
|
|
|
80 |
VERSION = datasets.Version("1.0.0")
|
81 |
|
82 |
BUILDER_CONFIG_CLASS = TheVaultConfig
|
83 |
+
BUILDER_CONFIGS = [TheVaultConfig(languages=[lang], split_set=[spl]) for lang in _LANG_CONFIGS for spl in _SPLIT_CONFIGS]
|
84 |
DEFAULT_CONFIG_NAME = "all-all"
|
85 |
|
86 |
|