Skip to content

Commit

Permalink
Updating cuda version and cupy version
Browse files Browse the repository at this point in the history
- latest Colab environment has changed and cuda and cupy versions cause
  issues, that are reported from learners
- Sebastian has research the issue and updated the notebook
  • Loading branch information
insop committed Feb 15, 2023
1 parent 2d2c2db commit 9827aff
Showing 1 changed file with 21 additions and 31 deletions.
52 changes: 21 additions & 31 deletions hw_openqa.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
},
"outputs": [],
"source": [
"!pip install torch==1.10.0\n",
"!pip install torch==1.10.1+cu113 -f https://download.pytorch.org/whl/torch_stable.html\n",
"\n",
"!pip install ujson\n",
"\n",
Expand Down Expand Up @@ -195,7 +195,8 @@
"import torch\n",
"\n",
"if torch.cuda.is_available():\n",
" !pip install cupy-cuda111"
" !pip uninstall cupy-cuda11x -y\n",
" !pip install cupy-cuda113"
]
},
{
Expand Down Expand Up @@ -404,13 +405,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "6LWz4f-3Yres",
"outputId": "11bb2cc3-140e-46d0-d04f-a35f74c97e12"
},
"metadata": {},
"outputs": [],
"source": [
"import os\n",
Expand All @@ -419,8 +414,7 @@
"\n",
"from colbert.infra import Run, RunConfig, ColBERTConfig\n",
"from colbert.data import Collection\n",
"from colbert.searcher import Searcher\n",
"from utility.utils.dpr import has_answer, DPR_normalize"
"from colbert.searcher import Searcher"
]
},
{
Expand Down Expand Up @@ -1637,6 +1631,15 @@
"For more rigorous evaluations of the retriever alone, we can use Sucess@`k` defined relative to the SQuAD passages and answers. We say that we have a \"success\" if a passage in the top `k` retrieved passages contains any of the answers substrings, and Sucess@`k` is the percentage of such success cases. This is very heuristic (perhaps the answer string happens to occur somewhere in a completely irrelevant passage), but it can still be good guidance."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from utility.utils.dpr import has_answer, DPR_normalize"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -2170,21 +2173,6 @@
"test_evaluator(evaluate_few_shot_open_qa)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "pXNI9BRNYre3",
"outputId": "2e428199-d5f7-4346-a80f-7a6934366efe"
},
"outputs": [],
"source": [
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -2603,11 +2591,8 @@
"provenance": [],
"toc_visible": true
},
"interpreter": {
"hash": "a99ac6d2deb03d0b7ced3594556c328848678d7cea021ae1b9990e15d3ad5c49"
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "nlu",
"language": "python",
"name": "python3"
},
Expand All @@ -2621,7 +2606,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.9.16"
},
"vscode": {
"interpreter": {
"hash": "81ef301a63437b26d6f879bc64646dce7fed7674109198cc71f09ca02787000d"
}
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down

0 comments on commit 9827aff

Please sign in to comment.