Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing import and tqdm improvement #940

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"outputs": [],
"source": [
"!pip3 install colpali-engine==0.2.2 pyvespa vespacli requests numpy scipy ir_measures pillow"
"!pip3 install colpali-engine==0.2.2 pyvespa vespacli requests numpy scipy ir_measures pillow datasets"
]
},
{
Expand Down Expand Up @@ -948,7 +948,7 @@
"profiles = [\"float-float\", \"float-binary\", \"binary-binary\", \"phased\"]\n",
"results = {profile: [] for profile in profiles}\n",
"async with app.asyncio(connections=3) as session:\n",
" for row, embedding in tqdm(zip(ds, query_embeddings)):\n",
" for row, embedding in zip(tqdm(ds), query_embeddings):\n",
" qrels.append(Qrel(row['questionId'], str(row['docId']), 1))\n",
" for profile in profiles:\n",
" scored_docs = await get_vespa_response(embedding, row['questionId'], session, profile=profile)\n",
Expand Down Expand Up @@ -1007,7 +1007,7 @@
"source": [
"results = {profile: [] for profile in [\"phased-rerank-count=5\", \"phased-rerank-count=10\", \"phased-rerank-count=20\", \"phased-rerank-count=40\"]}\n",
"async with app.asyncio(connections=3) as session:\n",
" for row, embedding in tqdm(zip(ds, query_embeddings)):\n",
" for row, embedding in zip(tqdm(ds), query_embeddings):\n",
" qrels.append(Qrel(row['questionId'], str(row['docId']), 1))\n",
" for count in [5, 10, 20, 40]:\n",
" scored_docs = await get_vespa_response(embedding, row['questionId'], session, profile=\"phased\", depth=count)\n",
Expand Down
Loading