Elron commited on
Commit
077586b
·
verified ·
1 Parent(s): 64dd81e

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. loaders.py +5 -1
  2. version.py +1 -1
loaders.py CHANGED
@@ -258,7 +258,7 @@ class LoadHF(LazyLoader):
258
  split:
259
  Optional specification of which split to load.
260
  data_files:
261
- Optional specification of particular data files to load.
262
  revision:
263
  Optional. The revision of the dataset. Often the commit id. Use in case you want to set the dataset version.
264
  streaming (bool):
@@ -351,6 +351,10 @@ class LoadHF(LazyLoader):
351
  def get_splits(self):
352
  if self.splits is not None:
353
  return self.splits
 
 
 
 
354
  try:
355
  return hf_get_dataset_splits(
356
  path=self.path,
 
258
  split:
259
  Optional specification of which split to load.
260
  data_files:
261
+ Optional specification of particular data files to load. When you provide a list of data_files to Hugging Face's load_dataset function without explicitly specifying the split argument, these files are automatically placed into the train split.
262
  revision:
263
  Optional. The revision of the dataset. Often the commit id. Use in case you want to set the dataset version.
264
  streaming (bool):
 
351
  def get_splits(self):
352
  if self.splits is not None:
353
  return self.splits
354
+ if self.data_files is not None:
355
+ if isinstance(self.data_files, dict):
356
+ return list(self.data_files.keys())
357
+ return ["train"]
358
  try:
359
  return hf_get_dataset_splits(
360
  path=self.path,
version.py CHANGED
@@ -1 +1 @@
1
- version = "1.22.0"
 
1
+ version = "1.22.1"