Skip to content

Commit

Permalink
Merge pull request #380 from vespa-engine/tgm/move-query-module
Browse files Browse the repository at this point in the history
Update tests to use learntorank.query and deprecate vespa.query
  • Loading branch information
thigm85 authored Oct 3, 2022
2 parents a268a6e + 27f3cd1 commit b1b4f85
Show file tree
Hide file tree
Showing 13 changed files with 713 additions and 672 deletions.
24 changes: 12 additions & 12 deletions docs/sphinx/source/collect-training-data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
"outputs": [],
"source": [
"from vespa.application import Vespa\n",
"from vespa.query import QueryModel, RankProfile, OR\n",
"from learntorank.query import QueryModel, Ranking, OR\n",
"\n",
"app = Vespa(url = \"https://api.cord19.vespa.ai\")\n",
"query_model = QueryModel(\n",
" match_phase = OR(),\n",
" rank_profile = RankProfile(name=\"bm25\", list_features=True)\n",
" ranking = Ranking(name=\"bm25\", list_features=True)\n",
")"
]
},
Expand Down Expand Up @@ -75,7 +75,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -413,7 +413,7 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>12 rows × 984 columns</p>\n",
"<p>12 rows × 1038 columns</p>\n",
"</div>"
],
"text/plain": [
Expand Down Expand Up @@ -585,10 +585,10 @@
"10 1.000000 1.000000 \n",
"11 0.250000 0.612500 \n",
"\n",
"[12 rows x 984 columns]"
"[12 rows x 1038 columns]"
]
},
"execution_count": 5,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -615,7 +615,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -953,7 +953,7 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>12 rows × 984 columns</p>\n",
"<p>12 rows × 1038 columns</p>\n",
"</div>"
],
"text/plain": [
Expand Down Expand Up @@ -1125,10 +1125,10 @@
"10 1.000000 1.000000 \n",
"11 0.250000 0.612500 \n",
"\n",
"[12 rows x 984 columns]"
"[12 rows x 1038 columns]"
]
},
"execution_count": 7,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1170,9 +1170,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.1"
"version": "3.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
4 changes: 2 additions & 2 deletions docs/sphinx/source/evaluation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
"outputs": [],
"source": [
"from vespa.application import Vespa\n",
"from vespa.query import QueryModel, RankProfile, OR\n",
"from learntorank.query import QueryModel, Ranking, OR\n",
"\n",
"app = Vespa(url = \"https://api.cord19.vespa.ai\")\n",
"query_model = QueryModel(\n",
" match_phase = OR(),\n",
" rank_profile = RankProfile(name=\"bm25\", list_features=True))"
" ranking = Ranking(name=\"bm25\", list_features=True))"
]
},
{
Expand Down
Loading

0 comments on commit b1b4f85

Please sign in to comment.