yunusskeete commited on
Commit
611ebe5
·
1 Parent(s): 8914cf6

Update Carla-COCO-Object-Detection-Dataset.py

Browse files
Carla-COCO-Object-Detection-Dataset.py CHANGED
@@ -92,6 +92,7 @@ class CARLA_COCO(datasets.GeneratorBasedBuilder):
92
  name=datasets.Split.TRAIN,
93
  # These kwargs will be passed to _generate_examples
94
  gen_kwargs={
 
95
  "filepath": os.path.join(downloaded_files["train"], "train.jsonl"),
96
  "split": "train"
97
  }
@@ -100,6 +101,7 @@ class CARLA_COCO(datasets.GeneratorBasedBuilder):
100
  name=datasets.Split.TEST,
101
  # These kwargs will be passed to _generate_examples
102
  gen_kwargs={
 
103
  "filepath": os.path.join(downloaded_files["test"], "test.jsonl"),
104
  "split": "test"
105
  }
@@ -107,7 +109,7 @@ class CARLA_COCO(datasets.GeneratorBasedBuilder):
107
  ]
108
 
109
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
110
- def _generate_examples(self, filepath):
111
  """
112
  This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
113
  The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
 
92
  name=datasets.Split.TRAIN,
93
  # These kwargs will be passed to _generate_examples
94
  gen_kwargs={
95
+ # "filepath": downloaded_files["train"],
96
  "filepath": os.path.join(downloaded_files["train"], "train.jsonl"),
97
  "split": "train"
98
  }
 
101
  name=datasets.Split.TEST,
102
  # These kwargs will be passed to _generate_examples
103
  gen_kwargs={
104
+ # "filepath": downloaded_files["test"],
105
  "filepath": os.path.join(downloaded_files["test"], "test.jsonl"),
106
  "split": "test"
107
  }
 
109
  ]
110
 
111
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
112
+ def _generate_examples(self, filepath, split):
113
  """
114
  This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
115
  The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.