Fraser-Greenlee commited on
Commit
2a5c16e
1 Parent(s): 8e93e52

add max steps & start tests

Browse files
Files changed (1) hide show
  1. program_synthesis.py +10 -3
program_synthesis.py CHANGED
@@ -22,7 +22,7 @@ _HOMEPAGE = "https://github.com/ellisk42/ec"
22
 
23
  _LICENSE = "MIT License"
24
 
25
- _MAX_STEPS = 10
26
 
27
 
28
  class infIterator:
@@ -79,11 +79,18 @@ class ProgramSynthesis(datasets.GeneratorBasedBuilder):
79
  def _split_generators(self, dl_manager):
80
  return [
81
  datasets.SplitGenerator(
82
- name=datasets.Split.TRAIN,
 
 
 
83
  ),
84
  ]
85
 
86
- def _generate_examples(self):
 
 
 
 
87
  task_samples = {
88
  'text': infIterator(textMakeTasks),
89
  'list': infIterator(listMakeTasks)
 
22
 
23
  _LICENSE = "MIT License"
24
 
25
+ _MAX_STEPS = 3782
26
 
27
 
28
  class infIterator:
 
79
  def _split_generators(self, dl_manager):
80
  return [
81
  datasets.SplitGenerator(
82
+ name=datasets.Split.TRAIN, gen_kwargs={'split': 'train'}
83
+ ),
84
+ datasets.SplitGenerator(
85
+ name=datasets.Split.TEST, gen_kwargs={'split': 'test'}
86
  ),
87
  ]
88
 
89
+ def _generate_examples(self, split):
90
+ if split == 'test':
91
+ # TODO read from: test.list.csv, test.text.csv
92
+ return
93
+
94
  task_samples = {
95
  'text': infIterator(textMakeTasks),
96
  'list': infIterator(listMakeTasks)