| #!/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') | |