Fix Tutorial 9 (#734)

* Add package download

* Change dev to train file
This commit is contained in:
Branden Chan 2021-01-14 10:56:58 +01:00 committed by GitHub
parent 3331608e03
commit 8d47a71b00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 3 deletions

View File

@ -8,7 +8,7 @@
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepset-ai/haystack/blob/master/tutorials/Tutorial9_DPR_training.ipynb)\n",
"\n",
"Haystack contains all the tools needed to train your own Dense Passage Retrieval model.\n",
"This tutorial will guide you through the steps required to create a retriever that is specifically tailored to your domain.\n"
"This tutorial will guide you through the steps required to create a retriever that is specifically tailored to your domain."
],
"metadata": {
"collapsed": false,
@ -17,6 +17,25 @@
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"# Install the latest release of Haystack in your own environment\n",
"#! pip install farm-haystack\n",
"\n",
"# Install the latest master of Haystack\n",
"!pip install git+https://github.com/deepset-ai/haystack.git\n",
"!pip install torch==1.6.0+cu101 torchvision==0.6.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
@ -318,7 +337,7 @@
"\n",
"retriever.train(\n",
" data_dir=doc_dir,\n",
" train_filename=dev_filename,\n",
" train_filename=train_filename,\n",
" dev_filename=dev_filename,\n",
" test_filename=dev_filename,\n",
" n_epochs=1,\n",

View File

@ -61,7 +61,7 @@ def tutorial9_dpr_training():
retriever.train(
data_dir=doc_dir,
train_filename=dev_filename,
train_filename=train_filename,
dev_filename=dev_filename,
test_filename=dev_filename,
n_epochs=1,