XingjianL commited on
Commit
de764b8
1 Parent(s): dd052ae

test split

Browse files
Files changed (1) hide show
  1. tomatotest.py +8 -3
tomatotest.py CHANGED
@@ -8,7 +8,11 @@ class CustomConfig(datasets.BuilderConfig):
8
  def __init__(self, **kwargs):
9
  super(CustomConfig, self).__init__(**kwargs)
10
  self.dataset_type = kwargs.pop("name", "all")
11
-
 
 
 
 
12
 
13
  class RGBSemanticDepthDataset(GeneratorBasedBuilder):
14
  BUILDER_CONFIGS = [
@@ -51,19 +55,20 @@ class RGBSemanticDepthDataset(GeneratorBasedBuilder):
51
 
52
  def _split_generators(self, dl_manager):
53
  archives = dl_manager.download({"train":["data/images_1730238419.175364.tar"]})
 
54
  return [
55
  SplitGenerator(
56
  name=Split.TRAIN,
57
  gen_kwargs={
58
  "archives": [dl_manager.iter_archive(archive) for archive in archives],
59
- "split_txt": "https://huggingface.co/datasets/XingjianLi/tomatotest/blob/main/train.txt"
60
  },
61
  ),
62
  SplitGenerator(
63
  name=Split.VALIDATION,
64
  gen_kwargs={
65
  "archives": [dl_manager.iter_archive(archive) for archive in archives],
66
- "split_txt": "https://huggingface.co/datasets/XingjianLi/tomatotest/blob/main/val.txt"
67
  },
68
  ),
69
  ]
 
8
  def __init__(self, **kwargs):
9
  super(CustomConfig, self).__init__(**kwargs)
10
  self.dataset_type = kwargs.pop("name", "all")
11
+ _metadata_urls = {
12
+ "train":"https://huggingface.co/datasets/XingjianLi/tomatotest/blob/main/train.txt",
13
+ "val":"https://huggingface.co/datasets/XingjianLi/tomatotest/blob/main/val.txt"
14
+
15
+ }
16
 
17
  class RGBSemanticDepthDataset(GeneratorBasedBuilder):
18
  BUILDER_CONFIGS = [
 
55
 
56
  def _split_generators(self, dl_manager):
57
  archives = dl_manager.download({"train":["data/images_1730238419.175364.tar"]})
58
+ split_metadata = dl_manager.download(_metadata_urls)
59
  return [
60
  SplitGenerator(
61
  name=Split.TRAIN,
62
  gen_kwargs={
63
  "archives": [dl_manager.iter_archive(archive) for archive in archives],
64
+ "split_txt": split_metadata["train"]
65
  },
66
  ),
67
  SplitGenerator(
68
  name=Split.VALIDATION,
69
  gen_kwargs={
70
  "archives": [dl_manager.iter_archive(archive) for archive in archives],
71
+ "split_txt": split_metadata["val"]
72
  },
73
  ),
74
  ]