chae-won-kim
commited on
Update calling split
Browse files- Multidialog.py +7 -5
Multidialog.py
CHANGED
@@ -22,7 +22,6 @@ _CITATION = """\
|
|
22 |
|
23 |
_DESCRIPTION = """\
|
24 |
Multidialog is the first large-sccale multimodal (i.e. audio, visual, and text) dialogue corpus, consisting of approximately 400 hours of audio-visual conversation strems between 6 pairs of conversation partners.
|
25 |
-
|
26 |
It contina
|
27 |
"""
|
28 |
|
@@ -30,6 +29,8 @@ _HOMEPAGE = "https://multidialog.github.io/"
|
|
30 |
|
31 |
_LICENSE = "Apache License 2.0"
|
32 |
|
|
|
|
|
33 |
_BASE_DATA_URL = "https://huggingface.co/datasets/IVLLab/MultiDialog/resolve/main/"
|
34 |
|
35 |
_AUDIO_ARCHIVE_URL = _BASE_DATA_URL + "data/{subset}/{subset}_chunks_{archive_id:04}.tar.gz"
|
@@ -55,7 +56,7 @@ class Multidialog(datasets.GeneratorBasedBuilder):
|
|
55 |
|
56 |
VERSION = datasets.Version("1.0.0")
|
57 |
|
58 |
-
BUILDER_CONFIGS = [MultidialogConfig(name=subset) for subset in
|
59 |
|
60 |
DEFAULT_WRITER_BATCH_SIZE = 128
|
61 |
|
@@ -81,7 +82,8 @@ class Multidialog(datasets.GeneratorBasedBuilder):
|
|
81 |
)
|
82 |
|
83 |
def _split_generators(self, dl_manager):
|
84 |
-
|
|
|
85 |
|
86 |
n_archives = {
|
87 |
"train" : [15, 4],
|
@@ -94,7 +96,7 @@ class Multidialog(datasets.GeneratorBasedBuilder):
|
|
94 |
# 2. prepare sharded archives with audio files
|
95 |
audio_archives_urls = {
|
96 |
split: [
|
97 |
-
_AUDIO_ARCHIVE_URL.format(subset=split, archive_id=i)
|
98 |
for i in range(n_archives[split][0])
|
99 |
]
|
100 |
for split in splits
|
@@ -110,7 +112,7 @@ class Multidialog(datasets.GeneratorBasedBuilder):
|
|
110 |
# 3. prepare sharded metadata csv files
|
111 |
meta_urls = {
|
112 |
split: [
|
113 |
-
_META_URL.format(subset=split, archiv_id=i)
|
114 |
for i in range(n_archives[split][1])
|
115 |
]
|
116 |
for split in splits
|
|
|
22 |
|
23 |
_DESCRIPTION = """\
|
24 |
Multidialog is the first large-sccale multimodal (i.e. audio, visual, and text) dialogue corpus, consisting of approximately 400 hours of audio-visual conversation strems between 6 pairs of conversation partners.
|
|
|
25 |
It contina
|
26 |
"""
|
27 |
|
|
|
29 |
|
30 |
_LICENSE = "Apache License 2.0"
|
31 |
|
32 |
+
_SUBSETS = ("train", "test_freq", "test_rare", "valid_freq", "valid_rare")
|
33 |
+
|
34 |
_BASE_DATA_URL = "https://huggingface.co/datasets/IVLLab/MultiDialog/resolve/main/"
|
35 |
|
36 |
_AUDIO_ARCHIVE_URL = _BASE_DATA_URL + "data/{subset}/{subset}_chunks_{archive_id:04}.tar.gz"
|
|
|
56 |
|
57 |
VERSION = datasets.Version("1.0.0")
|
58 |
|
59 |
+
BUILDER_CONFIGS = [MultidialogConfig(name=subset) for subset in _SUBSETS]
|
60 |
|
61 |
DEFAULT_WRITER_BATCH_SIZE = 128
|
62 |
|
|
|
82 |
)
|
83 |
|
84 |
def _split_generators(self, dl_manager):
|
85 |
+
splits_to_subsets = self.config.subsets_to_download
|
86 |
+
splits = _SUBSETS
|
87 |
|
88 |
n_archives = {
|
89 |
"train" : [15, 4],
|
|
|
96 |
# 2. prepare sharded archives with audio files
|
97 |
audio_archives_urls = {
|
98 |
split: [
|
99 |
+
_AUDIO_ARCHIVE_URL.format(subset=splits_to_subsets[split], archive_id=i)
|
100 |
for i in range(n_archives[split][0])
|
101 |
]
|
102 |
for split in splits
|
|
|
112 |
# 3. prepare sharded metadata csv files
|
113 |
meta_urls = {
|
114 |
split: [
|
115 |
+
_META_URL.format(subset=splits_to_subsets[split], archiv_id=i)
|
116 |
for i in range(n_archives[split][1])
|
117 |
]
|
118 |
for split in splits
|