DeanGumas commited on
Commit
506f5a9
·
1 Parent(s): ce9fc6c

Small tweaks to evaluation function

Browse files
Files changed (1) hide show
  1. test_pretrained.ipynb +8 -9
test_pretrained.ipynb CHANGED
@@ -329,7 +329,7 @@
329
  },
330
  {
331
  "cell_type": "code",
332
- "execution_count": 67,
333
  "metadata": {},
334
  "outputs": [
335
  {
@@ -344,17 +344,16 @@
344
  "name": "stdout",
345
  "output_type": "stream",
346
  "text": [
347
- "How many times did the Minnesota Timberwolves lose at home in the 2004 season despite recording more steals and blocks than their opponent?\n",
348
- "SELECT COUNT(*) FROM game g WHERE g.team_abbreviation_home = 'MIN' AND g.wl_home = 'L' AND g.stl_home > g.stl_away AND g.blk_home > g.blk_away AND g.season_id = '22004';\n",
349
- "0\n",
350
  "SQLite:\n",
351
  "SELECT COUNT(*) \n",
352
  "FROM game \n",
353
- "WHERE team_name_home = 'Minnesota Timberwolves' \n",
354
- "AND wl_home = 'L' \n",
355
- "AND season_id = '22004';\n",
356
  "\n",
357
- "[(17,)]\n",
358
  "SQL matched? False\n",
359
  "Result matched? False\n"
360
  ]
@@ -398,7 +397,7 @@
398
  " result = False\n",
399
  " for row in rows:\n",
400
  " for r in row:\n",
401
- " if str(r) == str(sample_result):\n",
402
  " return query_match, True\n",
403
  "\n",
404
  " # Compare results and return\n",
 
329
  },
330
  {
331
  "cell_type": "code",
332
+ "execution_count": 76,
333
  "metadata": {},
334
  "outputs": [
335
  {
 
344
  "name": "stdout",
345
  "output_type": "stream",
346
  "text": [
347
+ "How many games did the Indiana Pacers win at home with more than 15 fast break points in 1996?\n",
348
+ "SELECT COUNT(*) as wins FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_home = 'Indiana Pacers' AND g.wl_home = 'W' AND os.pts_fb_home > 15 AND g.season_id = '21996';\n",
349
+ "7.0\n",
350
  "SQLite:\n",
351
  "SELECT COUNT(*) \n",
352
  "FROM game \n",
353
+ "WHERE wl_home = 'W' \n",
354
+ "AND season_id = '2196' \n",
355
+ "AND pts_fb_home > 15;\n",
356
  "\n",
 
357
  "SQL matched? False\n",
358
  "Result matched? False\n"
359
  ]
 
397
  " result = False\n",
398
  " for row in rows:\n",
399
  " for r in row:\n",
400
+ " if str(r) in str(sample_result):\n",
401
  " return query_match, True\n",
402
  "\n",
403
  " # Compare results and return\n",