Skip to content

Commit

Permalink
GPL tutorial - add GPU header and open in colab button (#2736)
Browse files Browse the repository at this point in the history
* GPL tutorial - add GPU header and open in colab button

* Add GPL tutorial to run exclusion list
  • Loading branch information
vblagoje authored Jul 4, 2022
1 parent 1c1faa4 commit ffb7e4e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run tutorials
run: ./.github/utils/tutorials.sh ${{ env.pythonLocation }} "${{ steps.diff.outputs.added_modified }}" "Tutorial2_ Tutorial9_ Tutorial13_"
run: ./.github/utils/tutorials.sh ${{ env.pythonLocation }} "${{ steps.diff.outputs.added_modified }}" "Tutorial2_ Tutorial9_ Tutorial13_ Tutorial18_"
11 changes: 11 additions & 0 deletions docs/_src/tutorials/tutorials/18.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ id: "tutorial18md"
--->

# Generative Pseudo Labeling for Domain Adaptation of Dense Retrievals
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepset-ai/haystack/blob/master/tutorials/Tutorial18_GPL.ipynb)

#### Note: Adapted to Haystack from Nils Riemers' original [notebook](https://colab.research.google.com/gist/jamescalam/d2c888775c87f9882bb7c379a96adbc8/gpl-domain-adaptation.ipynb#scrollTo=183ff7ab)

The NLP models we use every day were trained on a corpus of data that reflects the world from the past. In the meantime, we've experienced world-changing events, like the COVID pandemics, and we'd like our models to know about them. Training a model from scratch is tedious work but what if we could just update the models with new data? Generative Pseudo Labeling comes to the rescue.
Expand Down Expand Up @@ -37,6 +39,15 @@ If we search again with the updated model, we get the search results we would ex
- 95.14 Polio is transmitted via contaminated water or food
- 94.13 HIV is transmitted via sex or sharing needles

### Prepare the Environment

#### Colab: Enable the GPU runtime
Make sure you enable the GPU runtime to experience decent speed in this tutorial.
**Runtime -> Change Runtime type -> Hardware accelerator -> GPU**

<img src="https://raw.githubusercontent.com/deepset-ai/haystack/master/docs/img/colab_gpu_runtime.jpg">



```python
!nvidia-smi
Expand Down
12 changes: 11 additions & 1 deletion tutorials/Tutorial18_GPL.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"cell_type": "markdown",
"source": [
"# Generative Pseudo Labeling for Domain Adaptation of Dense Retrievals\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deepset-ai/haystack/blob/master/tutorials/Tutorial18_GPL.ipynb)\n",
"\n",
"#### Note: Adapted to Haystack from Nils Riemers' original [notebook](https://colab.research.google.com/gist/jamescalam/d2c888775c87f9882bb7c379a96adbc8/gpl-domain-adaptation.ipynb#scrollTo=183ff7ab)\n",
"\n",
"The NLP models we use every day were trained on a corpus of data that reflects the world from the past. In the meantime, we've experienced world-changing events, like the COVID pandemics, and we'd like our models to know about them. Training a model from scratch is tedious work but what if we could just update the models with new data? Generative Pseudo Labeling comes to the rescue.\n",
Expand Down Expand Up @@ -31,7 +33,15 @@
"- 97.70\tCorona is transmitted via the air\n",
"- 96.71\tEbola is transmitted via direct contact with blood\n",
"- 95.14\tPolio is transmitted via contaminated water or food\n",
"- 94.13\tHIV is transmitted via sex or sharing needles"
"- 94.13\tHIV is transmitted via sex or sharing needles\n",
"\n",
"### Prepare the Environment\n",
"\n",
"#### Colab: Enable the GPU runtime\n",
"Make sure you enable the GPU runtime to experience decent speed in this tutorial.\n",
"**Runtime -> Change Runtime type -> Hardware accelerator -> GPU**\n",
"\n",
"<img src=\"https://raw.githubusercontent.com/deepset-ai/haystack/master/docs/img/colab_gpu_runtime.jpg\">\n"
],
"metadata": {
"collapsed": false,
Expand Down

0 comments on commit ffb7e4e

Please sign in to comment.