Skip to content

Commit b1b4f85

Browse files
authored
Merge pull request #380 from vespa-engine/tgm/move-query-module
Update tests to use learntorank.query and deprecate vespa.query
2 parents a268a6e + 27f3cd1 commit b1b4f85

13 files changed

+713
-672
lines changed

docs/sphinx/source/collect-training-data.ipynb

+12-12
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
"outputs": [],
3131
"source": [
3232
"from vespa.application import Vespa\n",
33-
"from vespa.query import QueryModel, RankProfile, OR\n",
33+
"from learntorank.query import QueryModel, Ranking, OR\n",
3434
"\n",
3535
"app = Vespa(url = \"https://api.cord19.vespa.ai\")\n",
3636
"query_model = QueryModel(\n",
3737
" match_phase = OR(),\n",
38-
" rank_profile = RankProfile(name=\"bm25\", list_features=True)\n",
38+
" ranking = Ranking(name=\"bm25\", list_features=True)\n",
3939
")"
4040
]
4141
},
@@ -75,7 +75,7 @@
7575
},
7676
{
7777
"cell_type": "code",
78-
"execution_count": 5,
78+
"execution_count": 3,
7979
"metadata": {},
8080
"outputs": [
8181
{
@@ -413,7 +413,7 @@
413413
" </tr>\n",
414414
" </tbody>\n",
415415
"</table>\n",
416-
"<p>12 rows × 984 columns</p>\n",
416+
"<p>12 rows × 1038 columns</p>\n",
417417
"</div>"
418418
],
419419
"text/plain": [
@@ -585,10 +585,10 @@
585585
"10 1.000000 1.000000 \n",
586586
"11 0.250000 0.612500 \n",
587587
"\n",
588-
"[12 rows x 984 columns]"
588+
"[12 rows x 1038 columns]"
589589
]
590590
},
591-
"execution_count": 5,
591+
"execution_count": 3,
592592
"metadata": {},
593593
"output_type": "execute_result"
594594
}
@@ -615,7 +615,7 @@
615615
},
616616
{
617617
"cell_type": "code",
618-
"execution_count": 7,
618+
"execution_count": 4,
619619
"metadata": {},
620620
"outputs": [
621621
{
@@ -953,7 +953,7 @@
953953
" </tr>\n",
954954
" </tbody>\n",
955955
"</table>\n",
956-
"<p>12 rows × 984 columns</p>\n",
956+
"<p>12 rows × 1038 columns</p>\n",
957957
"</div>"
958958
],
959959
"text/plain": [
@@ -1125,10 +1125,10 @@
11251125
"10 1.000000 1.000000 \n",
11261126
"11 0.250000 0.612500 \n",
11271127
"\n",
1128-
"[12 rows x 984 columns]"
1128+
"[12 rows x 1038 columns]"
11291129
]
11301130
},
1131-
"execution_count": 7,
1131+
"execution_count": 4,
11321132
"metadata": {},
11331133
"output_type": "execute_result"
11341134
}
@@ -1170,9 +1170,9 @@
11701170
"name": "python",
11711171
"nbconvert_exporter": "python",
11721172
"pygments_lexer": "ipython3",
1173-
"version": "3.9.1"
1173+
"version": "3.9.13"
11741174
}
11751175
},
11761176
"nbformat": 4,
1177-
"nbformat_minor": 2
1177+
"nbformat_minor": 4
11781178
}

docs/sphinx/source/evaluation.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
"outputs": [],
3131
"source": [
3232
"from vespa.application import Vespa\n",
33-
"from vespa.query import QueryModel, RankProfile, OR\n",
33+
"from learntorank.query import QueryModel, Ranking, OR\n",
3434
"\n",
3535
"app = Vespa(url = \"https://api.cord19.vespa.ai\")\n",
3636
"query_model = QueryModel(\n",
3737
" match_phase = OR(),\n",
38-
" rank_profile = RankProfile(name=\"bm25\", list_features=True))"
38+
" ranking = Ranking(name=\"bm25\", list_features=True))"
3939
]
4040
},
4141
{

0 commit comments

Comments
 (0)