Datasets:

Languages:
English
Multilinguality:
multilingual
Size Categories:
n>1T
Language Creators:
found
Annotations Creators:
no-annotation
Source Datasets:
original
ArXiv:
License:
xiaohk commited on
Commit
5fa48ba
1 Parent(s): 965466d

Remove space in split names

Browse files
Files changed (1) hide show
  1. diffusiondb.py +11 -11
diffusiondb.py CHANGED
@@ -110,11 +110,11 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
110
  for sampling in ["first", "random"]:
111
  for is_large in [False, True]:
112
  num_k_str = f"{num_k}k" if num_k < 1000 else f"{num_k // 1000}m"
113
- subset_str = " [large]" if is_large else " [2m]"
114
 
115
  if sampling == "random":
116
  # Name the config
117
- cur_name = "random_" + num_k_str + subset_str
118
 
119
  # Add a short description for each config
120
  cur_description = (
@@ -128,7 +128,7 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
128
  ).tolist()
129
  else:
130
  # Name the config
131
- cur_name = "first_" + num_k_str + subset_str
132
 
133
  # Add a short description for each config
134
  cur_description = f"The first {num_k_str} images in this dataset with their prompts and parameters"
@@ -151,11 +151,11 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
151
  for num_k in [5000, 10000]:
152
  for sampling in ["first", "random"]:
153
  num_k_str = f"{num_k // 1000}m"
154
- subset_str = " [large]"
155
 
156
  if sampling == "random":
157
  # Name the config
158
- cur_name = "random_" + num_k_str + subset_str
159
 
160
  # Add a short description for each config
161
  cur_description = (
@@ -169,7 +169,7 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
169
  ).tolist()
170
  else:
171
  # Name the config
172
- cur_name = "first_" + num_k_str + subset_str
173
 
174
  # Add a short description for each config
175
  cur_description = f"The first {num_k_str} images in this dataset with their prompts and parameters"
@@ -191,7 +191,7 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
191
  # Need to manually add all (2m) and all (large)
192
  BUILDER_CONFIGS.append(
193
  DiffusionDBConfig(
194
- name="all [2m]",
195
  part_ids=_PART_IDS,
196
  is_large=False,
197
  description="All images with their prompts and parameters",
@@ -200,7 +200,7 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
200
 
201
  BUILDER_CONFIGS.append(
202
  DiffusionDBConfig(
203
- name="all [large]",
204
  part_ids=_PART_IDS_LARGE,
205
  is_large=True,
206
  description="All images with their prompts and parameters",
@@ -210,7 +210,7 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
210
  # We also prove a text-only option, which loads the meatadata parquet file
211
  BUILDER_CONFIGS.append(
212
  DiffusionDBConfig(
213
- name="text_only [2m]",
214
  part_ids=[],
215
  is_large=False,
216
  description="Only include all prompts and parameters (no image)",
@@ -219,7 +219,7 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
219
 
220
  BUILDER_CONFIGS.append(
221
  DiffusionDBConfig(
222
- name="text_only [large]",
223
  part_ids=[],
224
  is_large=True,
225
  description="Only include all prompts and parameters (no image)",
@@ -227,7 +227,7 @@ class DiffusionDB(datasets.GeneratorBasedBuilder):
227
  )
228
 
229
  # Default to only load 1k random images
230
- DEFAULT_CONFIG_NAME = "random_1k [2m]"
231
 
232
  def _info(self):
233
  """Specify the information of DiffusionDB."""
 
110
  for sampling in ["first", "random"]:
111
  for is_large in [False, True]:
112
  num_k_str = f"{num_k}k" if num_k < 1000 else f"{num_k // 1000}m"
113
+ subset_str = "large_" if is_large else "2m_"
114
 
115
  if sampling == "random":
116
  # Name the config
117
+ cur_name = subset_str + "random_" + num_k_str
118
 
119
  # Add a short description for each config
120
  cur_description = (
 
128
  ).tolist()
129
  else:
130
  # Name the config
131
+ cur_name = subset_str + "first_" + num_k_str
132
 
133
  # Add a short description for each config
134
  cur_description = f"The first {num_k_str} images in this dataset with their prompts and parameters"
 
151
  for num_k in [5000, 10000]:
152
  for sampling in ["first", "random"]:
153
  num_k_str = f"{num_k // 1000}m"
154
+ subset_str = "large_"
155
 
156
  if sampling == "random":
157
  # Name the config
158
+ cur_name = subset_str + "random_" + num_k_str
159
 
160
  # Add a short description for each config
161
  cur_description = (
 
169
  ).tolist()
170
  else:
171
  # Name the config
172
+ cur_name = subset_str + "first_" + num_k_str
173
 
174
  # Add a short description for each config
175
  cur_description = f"The first {num_k_str} images in this dataset with their prompts and parameters"
 
191
  # Need to manually add all (2m) and all (large)
192
  BUILDER_CONFIGS.append(
193
  DiffusionDBConfig(
194
+ name="2m_all",
195
  part_ids=_PART_IDS,
196
  is_large=False,
197
  description="All images with their prompts and parameters",
 
200
 
201
  BUILDER_CONFIGS.append(
202
  DiffusionDBConfig(
203
+ name="large_all",
204
  part_ids=_PART_IDS_LARGE,
205
  is_large=True,
206
  description="All images with their prompts and parameters",
 
210
  # We also prove a text-only option, which loads the meatadata parquet file
211
  BUILDER_CONFIGS.append(
212
  DiffusionDBConfig(
213
+ name="2m_text_only",
214
  part_ids=[],
215
  is_large=False,
216
  description="Only include all prompts and parameters (no image)",
 
219
 
220
  BUILDER_CONFIGS.append(
221
  DiffusionDBConfig(
222
+ name="large_text_only",
223
  part_ids=[],
224
  is_large=True,
225
  description="Only include all prompts and parameters (no image)",
 
227
  )
228
 
229
  # Default to only load 1k random images
230
+ DEFAULT_CONFIG_NAME = "2m_random_1k"
231
 
232
  def _info(self):
233
  """Specify the information of DiffusionDB."""