yiqun commited on
Commit
2626114
1 Parent(s): 055c5ee

Remove invalid testA and testB from refcocog.

Browse files
Files changed (1) hide show
  1. referit.py +4 -1
referit.py CHANGED
@@ -155,7 +155,10 @@ class ReferitDataset(datasets.GeneratorBasedBuilder):
155
  # urls = _URLS[self.config.name]
156
  # data_dir = dl_manager.download_and_extract(urls)
157
  splits = []
158
- for split in ("train", "val", "test", "testA", "testB"):
 
 
 
159
  splits.append(datasets.SplitGenerator(
160
  name=datasets.NamedSplit(split),
161
  gen_kwargs={
 
155
  # urls = _URLS[self.config.name]
156
  # data_dir = dl_manager.download_and_extract(urls)
157
  splits = []
158
+ split_names = ("train", "val", "test")
159
+ if self.config.name in ("refcoco", "refcoco+"):
160
+ split_names += ("testA", "testB")
161
+ for split in split_names:
162
  splits.append(datasets.SplitGenerator(
163
  name=datasets.NamedSplit(split),
164
  gen_kwargs={