File size: 651 Bytes
6cce9e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python3
"""Create a tiny mock /tmp/data/test.csv to validate file format locally."""
from pathlib import Path
import pandas as pd

Path('/tmp/data').mkdir(parents=True, exist_ok=True)
rows = [
    {
        'id': 'mock001',
        'context': 'Here are examples in a toy language:\nmi go | I go\nyu go | you go\nmi sleep | I sleep',
        'query': 'Translate into English:\n1. yu sleep\n2. mi go',
        'work_lang': 'eng_Latn',
        'task_lang': 'toy_Latn',
        'task_type': 'translation',
        'eval_type': 'single',
    }
]
pd.DataFrame(rows).to_csv('/tmp/data/test.csv', index=False)
print('Wrote /tmp/data/test.csv')