matt-tries-dl
commited on
Commit
•
01e2d8f
1
Parent(s):
8f8b1a3
chkpt
Browse files- llama_test.ipynb +37 -0
llama_test.ipynb
CHANGED
@@ -157,6 +157,43 @@
|
|
157 |
"! git clone https://github.com/salesforce/WikiSQL\n",
|
158 |
"! tar xvjf WikiSQL/data.tar.bz2"
|
159 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
}
|
161 |
],
|
162 |
"metadata": {
|
|
|
157 |
"! git clone https://github.com/salesforce/WikiSQL\n",
|
158 |
"! tar xvjf WikiSQL/data.tar.bz2"
|
159 |
]
|
160 |
+
},
|
161 |
+
{
|
162 |
+
"cell_type": "code",
|
163 |
+
"execution_count": 15,
|
164 |
+
"metadata": {},
|
165 |
+
"outputs": [
|
166 |
+
{
|
167 |
+
"name": "stdout",
|
168 |
+
"output_type": "stream",
|
169 |
+
"text": [
|
170 |
+
"{'phase': 1, 'table_id': '1-1000181-1', 'question': 'Tell me what the notes are for South Australia ', 'sql': {'sel': 5, 'conds': [[3, 0, 'SOUTH AUSTRALIA']], 'agg': 0}}\n",
|
171 |
+
"\n",
|
172 |
+
"1-1000181-1\n",
|
173 |
+
"['State/territory', 'Text/background colour', 'Format', 'Current slogan', 'Current series', 'Notes']\n",
|
174 |
+
"\n",
|
175 |
+
"{'id': '1-1000181-1', 'header': ['State/territory', 'Text/background colour', 'Format', 'Current slogan', 'Current series', 'Notes'], 'types': ['text', 'text', 'text', 'text', 'text', 'text'], 'rows': [['Australian Capital Territory', 'blue/white', 'Yaa·nna', 'ACT · CELEBRATION OF A CENTURY 2013', 'YIL·00A', 'Slogan screenprinted on plate'], ['New South Wales', 'black/yellow', 'aa·nn·aa', 'NEW SOUTH WALES', 'BX·99·HI', 'No slogan on current series'], ['New South Wales', 'black/white', 'aaa·nna', 'NSW', 'CPX·12A', 'Optional white slimline series'], ['Northern Territory', 'ochre/white', 'Ca·nn·aa', 'NT · OUTBACK AUSTRALIA', 'CB·06·ZZ', 'New series began in June 2011'], ['Queensland', 'maroon/white', 'nnn·aaa', 'QUEENSLAND · SUNSHINE STATE', '999·TLG', 'Slogan embossed on plate'], ['South Australia', 'black/white', 'Snnn·aaa', 'SOUTH AUSTRALIA', 'S000·AZD', 'No slogan on current series'], ['Victoria', 'blue/white', 'aaa·nnn', 'VICTORIA - THE PLACE TO BE', 'ZZZ·562', 'Current series will be exhausted this year']], 'name': 'table_1000181_1'}\n"
|
176 |
+
]
|
177 |
+
}
|
178 |
+
],
|
179 |
+
"source": [
|
180 |
+
"import json\n",
|
181 |
+
"with open('data/train.jsonl') as f:\n",
|
182 |
+
" j = f.readline()\n",
|
183 |
+
" js = json.loads(j)\n",
|
184 |
+
" print(js)\n",
|
185 |
+
"\n",
|
186 |
+
"print()\n",
|
187 |
+
"\n",
|
188 |
+
"with open('data/train.tables.jsonl') as f:\n",
|
189 |
+
" j = f.readline()\n",
|
190 |
+
" js = json.loads(j)\n",
|
191 |
+
" #print(js)\n",
|
192 |
+
" print(js['id'])\n",
|
193 |
+
" print(js['header'])\n",
|
194 |
+
" print()\n",
|
195 |
+
" print(js)"
|
196 |
+
]
|
197 |
}
|
198 |
],
|
199 |
"metadata": {
|