michal commited on
Commit
24d957e
1 Parent(s): d6e7632

Only train split

Browse files
Files changed (1) hide show
  1. biovdb_1000.py +3 -5
biovdb_1000.py CHANGED
@@ -3,7 +3,7 @@ import datasets
3
 
4
  CITATION = """
5
  """
6
-
7
  CSV_URL = "https://huggingface.co/datasets/mwinn99/biovdb_1000/resolve/main/biovdb_1000.csv"
8
 
9
  class Biovdb(datasets.GeneratorBasedBuilder):
@@ -23,10 +23,8 @@ class Biovdb(datasets.GeneratorBasedBuilder):
23
  def _split_generators(self, dl_manager):
24
  data_fname = dl_manager.download(CSV_URL)
25
  data = pd.read_csv(data_fname)
26
- series_ids = data['series_id'].str.split(',', expand=True).stack().unique()
27
  return [
28
- datasets.SplitGenerator(name=series_id, gen_kwargs={"data": data[data['series_id'].str.contains(series_id)]})
29
- for series_id in series_ids
30
  ]
31
 
32
  def _generate_examples(self, data):
@@ -41,5 +39,5 @@ class Biovdb(datasets.GeneratorBasedBuilder):
41
  }
42
 
43
  if __name__ == '__main__':
44
- ds = datasets.load_dataset("./biovdb_1000.py", "GSE52")
45
 
 
3
 
4
  CITATION = """
5
  """
6
+ #TODO: There must be other way to refer to file in the repo
7
  CSV_URL = "https://huggingface.co/datasets/mwinn99/biovdb_1000/resolve/main/biovdb_1000.csv"
8
 
9
  class Biovdb(datasets.GeneratorBasedBuilder):
 
23
  def _split_generators(self, dl_manager):
24
  data_fname = dl_manager.download(CSV_URL)
25
  data = pd.read_csv(data_fname)
 
26
  return [
27
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"data": data})
 
28
  ]
29
 
30
  def _generate_examples(self, data):
 
39
  }
40
 
41
  if __name__ == '__main__':
42
+ ds = datasets.load_dataset("./biovdb_1000.py", split='train')
43