Fraser-Greenlee commited on
Commit
425eac9
1 Parent(s): 4f829c4

small fixes

Browse files
Files changed (5) hide show
  1. make_test_files.py +2 -2
  2. program_synthesis.py +1 -1
  3. test.list.csv +0 -0
  4. test.py +2 -1
  5. test.text.csv +0 -0
make_test_files.py CHANGED
@@ -3,7 +3,7 @@ import datasets
3
 
4
 
5
  data = datasets.load_dataset('program_synthesis.py', 'text')['train']
6
- data.to_csv('test.text.csv')
7
 
8
  data = datasets.load_dataset('program_synthesis.py', 'list')['train']
9
- data.to_csv('test.list.csv')
 
3
 
4
 
5
  data = datasets.load_dataset('program_synthesis.py', 'text')['train']
6
+ data.to_csv('test.text.csv', index=False)
7
 
8
  data = datasets.load_dataset('program_synthesis.py', 'list')['train']
9
+ data.to_csv('test.list.csv', index=False)
program_synthesis.py CHANGED
@@ -101,7 +101,7 @@ class ProgramSynthesis(datasets.GeneratorBasedBuilder):
101
  else:
102
  raise Exception('Bad Config')
103
  for i, row in df.iterrows():
104
- yield i, row
105
  return
106
 
107
  task_samples = {
 
101
  else:
102
  raise Exception('Bad Config')
103
  for i, row in df.iterrows():
104
+ yield i, dict(row)
105
  return
106
 
107
  task_samples = {
test.list.csv CHANGED
The diff for this file is too large to render. See raw diff
 
test.py CHANGED
@@ -1,9 +1,10 @@
1
  import datasets
2
 
3
 
4
- data = datasets.load_dataset('program_synthesis.py', 'list')
5
  print(data['train'][:4])
6
 
 
7
 
8
  data = datasets.load_dataset('program_synthesis', 'all', cache_dir='cache')
9
  print(data['train'][:4])
 
1
  import datasets
2
 
3
 
4
+ data = datasets.load_dataset('program_synthesis.py', 'all')
5
  print(data['train'][:4])
6
 
7
+ breakpoint()
8
 
9
  data = datasets.load_dataset('program_synthesis', 'all', cache_dir='cache')
10
  print(data['train'][:4])
test.text.csv CHANGED
The diff for this file is too large to render. See raw diff