Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
71f5583
RelCAT tutorials v1.
vladd-bit May 12, 2025
e718e4e
Updated RelCAT notebooks (incl html version).
vladd-bit May 13, 2025
1a36181
Updated README.md
vladd-bit May 13, 2025
8560f25
Workflow update to incl RelCAT.
vladd-bit May 13, 2025
9944769
Update MedCAT requirement to 1.16
mart-r May 16, 2025
b1e6fcb
Allow nbmake>=1.4 for compatibility with pydantic 2.
mart-r May 16, 2025
0ff17ef
Make workflow run on ubuntu-24.04
mart-r May 16, 2025
5463c02
Bump all install targets to 1.16
mart-r May 16, 2025
c0590e4
Updated RelCAT tutorial to include tutorial model links.
vladd-bit May 19, 2025
4e90c3a
Merge branch 'rel_cat_tutorials' of https://github.com/CogStack/MedCA…
vladd-bit May 19, 2025
957fae8
Allow later pandas versions
mart-r May 20, 2025
df026af
Revert "Allow later pandas versions"
mart-r May 20, 2025
24cbbca
Force usage of full path for model
mart-r May 20, 2025
dadb075
Add some debug information regarding issues when loading model
mart-r May 20, 2025
7cb593f
Do archive unpack in pytho nrather than in a subprocess
mart-r May 20, 2025
d83b1ab
Unpack model in part 6.2 to a distinct path
mart-r May 20, 2025
0fd28a1
Undo debug output / exception handling
mart-r May 20, 2025
477edc0
Make sure to use correct paths when downloading and unzipping
mart-r May 20, 2025
f433823
Remove unused import
mart-r May 20, 2025
f67e54d
Use relative paths again for downloaded model
mart-r May 20, 2025
4adedb6
Fix usage of undefined variable
mart-r May 20, 2025
591d467
Fix loadable model path
mart-r May 20, 2025
8829e12
Add further information to exception
mart-r May 21, 2025
c7c26a3
Specfiy unzip path explicitly
mart-r May 21, 2025
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
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
main:

runs-on: macos-latest
runs-on: ubuntu-24.04
strategy:
matrix:
part: [
Expand All @@ -18,6 +18,7 @@ jobs:
introductory/Part_4_*.ipynb,
introductory/Part_5_*.ipynb,
introductory/Part_1_*.ipynb,
introductory/Part_6_*.ipynb,
specialised/Comparing_Models_with_RegressionSuite.ipynb # this should work still
# specialised/*.ipynb # To make it run, the SnomedCT file needs to be mocked
]
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ In this tutorial, we will walk you through each stage of a basic MedCAT project.
| 4.2 | [Supervised training and fine-tuning + Meta-annotations](https://htmlpreview.github.io/?https://github.com/CogStack/MedCATtutorials/blob/main/notebooks/introductory/Part_4_2_Supervised_Training_and_Meta_annotations.html) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/CogStack/MedCATtutorials/blob/main/notebooks/introductory/Part_4_2_Supervised_Training_and_Meta_annotations.ipynb) | - |
| 4.3 | [Annotating documents with the full MedCAT pipeline with MetaAnnotations](https://htmlpreview.github.io/?https://github.com/CogStack/MedCATtutorials/blob/main/notebooks/introductory/Part_4_3_Annotating_documents_with_the_full_MedCAT_pipeline_with_MetaAnnotations.html) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/CogStack/MedCATtutorials/blob/main/notebooks/introductory/Part_4_3_Annotating_documents_with_the_full_MedCAT_pipeline_with_MetaAnnotations.ipynb) | - |
| 5 | [Analysing the results](https://htmlpreview.github.io/?https://github.com/CogStack/MedCATtutorials/blob/main/notebooks/introductory/Part_5_Prevalence_of_Physical_and_Mental_Diseases.html) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/CogStack/MedCATtutorials/blob/main/notebooks/introductory/Part_5_Prevalence_of_Physical_and_Mental_Diseases.ipynb) | [TDS](https://medium.com/@w_is_h/prevalence-of-physical-and-mental-diseases-450c0f4f5851) |

| 6.1 | [Supervised training Relation-annotations](https://htmlpreview.github.io/?https://github.com/CogStack/MedCATtutorials/blob/rel_cat_tutorials/notebooks/introductory/Part_6_1_Supervised_Training_Relation_Extraction.html) | - | - |
| 6.2 | [Infering relationships from annotations](https://htmlpreview.github.io/?https://github.com/CogStack/MedCATtutorials/blob/rel_cat_tutorials/notebooks/introductory/Part_6_2_Infering_relations_from_annotations_with_Relation_toolkit.html) | - | - |

## Specialised tutorials

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13095,7 +13095,7 @@ <h1 id="MedCAT-tutorial---logging-with-MedCAT">MedCAT tutorial - logging with Me
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Install medcat</span>
<span class="o">!</span> pip install medcat~<span class="o">=</span><span class="m">1</span>.14.0
<span class="o">!</span> pip install medcat~<span class="o">=</span><span class="m">1</span>.16.0
<span class="k">try</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">medcat.cat</span> <span class="kn">import</span> <span class="n">CAT</span>
<span class="k">except</span><span class="p">:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"outputs": [],
"source": [
"# Install medcat\n",
"! pip install medcat~=1.14.0\n",
"! pip install medcat~=1.16.0\n",
"try:\n",
" from medcat.cat import CAT\n",
"except:\n",
Expand Down Expand Up @@ -189,7 +189,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.9.6 ('venv': venv)",
"display_name": "tvenv",
"language": "python",
"name": "python3"
},
Expand All @@ -204,11 +204,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
},
"vscode": {
"interpreter": {
"hash": "0d20877e080635f7c4968c49fce8aa5e74c8d7837295e20d04554edce953f9c6"
}
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13095,11 +13095,11 @@ <h3 id="First-we-need-to-install-MedCAT">First we need to install MedCAT<a class
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[1]:</div>
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Install MedCAT</span>
<span class="o">!</span> pip install medcat~<span class="o">=</span><span class="m">1</span>.14.0
<span class="o">!</span> pip install medcat~<span class="o">=</span><span class="m">1</span>.16.0
<span class="c1"># Get the scispacy model</span>
<span class="o">!</span> python -m spacy download en_core_web_md
<span class="k">try</span><span class="p">:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -322,7 +322,7 @@
],
"source": [
"# Install MedCAT\n",
"! pip install medcat~=1.14.0\n",
"! pip install medcat~=1.16.0\n",
"# Get the scispacy model\n",
"! python -m spacy download en_core_web_md\n",
"try:\n",
Expand Down Expand Up @@ -1371,7 +1371,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3.8.5 ('.venv': venv)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -1386,11 +1386,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
},
"vscode": {
"interpreter": {
"hash": "60954f76b319195d8b66f263176ecf047c3a086773bff2d42e03144b47421836"
}
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13088,11 +13088,11 @@ <h1 id="Now-let's-start-extracting-concepts-from-unstructured-text!">Now let's s
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[1]:</div>
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Install medcat</span>
<span class="o">!</span> pip install medcat~<span class="o">=</span><span class="m">1</span>.14.0
<span class="o">!</span> pip install medcat~<span class="o">=</span><span class="m">1</span>.16.0
<span class="c1"># install seaborn</span>
<span class="o">!</span> pip install seaborn
<span class="k">try</span><span class="p">:</span>
Expand Down Expand Up @@ -14706,10 +14706,10 @@ <h2 id="Use-Multiprocessing">Use Multiprocessing<a class="anchor-link" href="#Us



<div id="9de888b0-4c6d-44f7-bd70-b4316f888f78"></div>
<div id="22300e60-822a-4878-b1d9-b57e2581a4b9"></div>
<div class="output_subarea output_widget_view ">
<script type="text/javascript">
var element = $('#9de888b0-4c6d-44f7-bd70-b4316f888f78');
var element = $('#22300e60-822a-4878-b1d9-b57e2581a4b9');
</script>
<script type="application/vnd.jupyter.widget-view+json">
{"model_id": "05b18c97da9d4d05b9280df006a5fb82", "version_major": 2, "version_minor": 0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -275,7 +275,7 @@
],
"source": [
"# Install medcat\n",
"! pip install medcat~=1.14.0\n",
"! pip install medcat~=1.16.0\n",
"# install seaborn\n",
"! pip install seaborn\n",
"try:\n",
Expand Down Expand Up @@ -2847,7 +2847,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3.8.5 ('.venv': venv)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -2862,11 +2862,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
},
"vscode": {
"interpreter": {
"hash": "60954f76b319195d8b66f263176ecf047c3a086773bff2d42e03144b47421836"
}
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13088,11 +13088,11 @@ <h1 id="Now-let's-look-at-ways-to-optimise-the-model-for-our-specific-use-case">
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[8]:</div>
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Install medcat</span>
<span class="o">!</span> pip install medcat~<span class="o">=</span><span class="m">1</span>.14.0
<span class="o">!</span> pip install medcat~<span class="o">=</span><span class="m">1</span>.16.0
<span class="k">try</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">medcat.cat</span> <span class="kn">import</span> <span class="n">CAT</span>
<span class="k">except</span><span class="p">:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -165,7 +165,7 @@
],
"source": [
"# Install medcat\n",
"! pip install medcat~=1.14.0\n",
"! pip install medcat~=1.16.0\n",
"try:\n",
" from medcat.cat import CAT\n",
"except:\n",
Expand Down Expand Up @@ -413,7 +413,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3.8.5 ('.venv': venv)",
"display_name": "tvenv",
"language": "python",
"name": "python3"
},
Expand All @@ -428,11 +428,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
},
"vscode": {
"interpreter": {
"hash": "60954f76b319195d8b66f263176ecf047c3a086773bff2d42e03144b47421836"
}
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13089,11 +13089,11 @@ <h4><b>NOTE:</b> This tutorial is applicable for BiLSTM model not BERT as BERT m
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[1]:</div>
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Install medcat</span>
<span class="o">!</span> pip install medcat~<span class="o">=</span><span class="m">1</span>.14.0
<span class="o">!</span> pip install medcat~<span class="o">=</span><span class="m">1</span>.16.0
<span class="k">try</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">medcat.cat</span> <span class="kn">import</span> <span class="n">CAT</span>
<span class="k">except</span><span class="p">:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -272,7 +272,7 @@
],
"source": [
"# Install medcat\n",
"! pip install medcat~=1.14.0\n",
"! pip install medcat~=1.16.0\n",
"try:\n",
" from medcat.cat import CAT\n",
"except:\n",
Expand Down Expand Up @@ -678,7 +678,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3.8.5 ('.venv': venv)",
"display_name": "tvenv",
"language": "python",
"name": "python3"
},
Expand All @@ -693,11 +693,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
},
"vscode": {
"interpreter": {
"hash": "60954f76b319195d8b66f263176ecf047c3a086773bff2d42e03144b47421836"
}
}
},
"nbformat": 4,
Expand Down
Loading