cloverhxy commited on
Commit
8ad9b16
1 Parent(s): 794eecb

Update semi-heter.py

Browse files
Files changed (1) hide show
  1. semi-heter.py +1 -8
semi-heter.py CHANGED
@@ -67,14 +67,7 @@ class semiHeter(datasets.GeneratorBasedBuilder):
67
  "path_file": dl_manager.download_and_extract(self.config.data_url), "split": "target", })]
68
 
69
  def _generate_examples(self, path_file, split):
70
- if split in ['source']:
71
- with open(path_file, "r") as f:
72
- file = json.load(f)
73
- for i in range(len(file)):
74
- yield i, {
75
- "content": file[i]
76
- }
77
- elif split in ['target']:
78
  with open(path_file, "r") as f:
79
  file = json.load(f)
80
  for i in range(len(file)):
 
67
  "path_file": dl_manager.download_and_extract(self.config.data_url), "split": "target", })]
68
 
69
  def _generate_examples(self, path_file, split):
70
+ if split in ['source', 'target']:
 
 
 
 
 
 
 
71
  with open(path_file, "r") as f:
72
  file = json.load(f)
73
  for i in range(len(file)):