From 682beb03eb653b8f40c19f60c0621e50cbd6b796 Mon Sep 17 00:00:00 2001 From: Mart Ratas Date: Mon, 12 Oct 2026 09:25:44 +0100 Subject: [PATCH 1/4] build(medcat-v1-tutorials): Bump install version in failing notebook This notebook fails at smoke test time (see [this](https://github.com/CogStack/cogstack-nlp/actions/runs/38109937110/job/114718466295)). It just says kernel died. Hopefully this fixes it, but I can't be sure. --- .../specialised/Comparing_Models_with_RegressionSuite.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.ipynb b/v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.ipynb index 46844a41b..e7634823e 100644 --- a/v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.ipynb +++ b/v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.ipynb @@ -176,7 +176,7 @@ ], "source": [ "# Install medcat\n", - "! pip install medcat~=1.14.0 # regression suite fully available starting version 1.7.0\n", + "! pip install medcat~=1.16.0 # regression suite fully available starting version 1.7.0\n", "try:\n", " from medcat.cat import CAT\n", "except:\n", From 714edb4b22fb1f9f1e5984525592466554a2482d Mon Sep 17 00:00:00 2001 From: Mart Ratas Date: Mon, 12 Oct 2026 09:34:11 +0100 Subject: [PATCH 2/4] Remove failing workflow (regression suite stuff) --- .../workflows/medcat-v1-tutorials_main.yml | 3 +- ...Comparing_Models_with_RegressionSuite.html | 14264 ---------------- ...omparing_Models_with_RegressionSuite.ipynb | 1133 -- 3 files changed, 1 insertion(+), 15399 deletions(-) delete mode 100644 v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.html delete mode 100644 v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.ipynb diff --git a/.github/workflows/medcat-v1-tutorials_main.yml b/.github/workflows/medcat-v1-tutorials_main.yml index 8d031dd27..640c1e4fe 100644 --- a/.github/workflows/medcat-v1-tutorials_main.yml +++ b/.github/workflows/medcat-v1-tutorials_main.yml @@ -25,8 +25,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 + introductory/Part_6_*.ipynb # specialised/*.ipynb # To make it run, the SnomedCT file needs to be mocked ] diff --git a/v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.html b/v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.html deleted file mode 100644 index b6de2607c..000000000 --- a/v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.html +++ /dev/null @@ -1,14264 +0,0 @@ - - - - -Comparing_Models_with_RegressionSuite - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
-

Comparing models using regression test tooling

Users of MedCAT might find themselves with multiple different models (i.e the same model at various stage of training). -But it might be unclear which one performs best for their (or someone else's) specific usecase(s). -This is where the regression test suite built into MedCAT (fully supported starting v1.7.0) can be helpful

-

The regresion suite tooling has been built with a few objectives in mind

-
    -
  • Ability to generate metrics on a pre-defined gold standard regression suite(s)
  • -
  • Allow users to compare the metrics of different models
  • -
  • Provide tooling to make generate regression suites
  • -
- -
-
-
-
-
-
-

The general workflow of the built in regression tooling as follows

-
    -
  1. Generate a gold standard regression suite (i.e from MedCATtrainer export)
  2. -
  3. [Optional] Create relevant categories of CUIs/TUIs/names of concepts
  4. -
  5. [Optional] Split the gold standard into multiple regression suites
  6. -
  7. Run regression tests on one (or many) model(s)
  8. -
- -
-
-
-
-
-
In [3]:
-
-
-
# Install medcat
-! pip install medcat~=1.14.0 # regression suite fully available starting version 1.7.0
-try:
-    from medcat.cat import CAT
-except:
-    print("WARNING: Runtime will restart automatically and please run other cells thereafter.")
-    exit()
-
- -
-
-
- -
-
- - -
- -
- - -
-
Requirement already satisfied: medcat==1.7.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (1.7.0)
-Requirement already satisfied: torch>=1.13.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.13.1)
-Requirement already satisfied: scikit-learn>=1.1.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.2.1)
-Requirement already satisfied: click>=8.0.4 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (8.0.4)
-Requirement already satisfied: pandas>=1.4.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.4.2)
-Requirement already satisfied: transformers>=4.19.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (4.19.4)
-Requirement already satisfied: blis<0.8.0,>=0.7.8 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (0.7.9)
-Requirement already satisfied: scipy~=1.9.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.9.3)
-Requirement already satisfied: spacy>=3.1.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (3.5.0)
-Requirement already satisfied: gensim>=4.3.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (4.3.0)
-Requirement already satisfied: aiohttp==3.8.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (3.8.3)
-Requirement already satisfied: datasets>=2.2.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (2.2.2)
-Requirement already satisfied: py2neo~=2021.2.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (2021.2.3)
-Requirement already satisfied: ipywidgets>=7.6.5 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (7.6.6)
-Requirement already satisfied: numpy>=1.22.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.23.3)
-Requirement already satisfied: dill>=0.3.4 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (0.3.4)
-Requirement already satisfied: pydantic>=1.10.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.10.5)
-Requirement already satisfied: psutil>=5.8.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (5.9.2)
-Requirement already satisfied: xxhash>=3.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (3.0.0)
-Requirement already satisfied: multiprocess~=0.70.12 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (0.70.12)
-Requirement already satisfied: aiofiles>=0.8.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (0.8.0)
-Requirement already satisfied: tqdm>=4.27 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (4.64.1)
-Requirement already satisfied: jsonpickle>=2.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (2.0.0)
-Requirement already satisfied: yarl<2.0,>=1.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (1.8.1)
-Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (4.0.2)
-Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (2.1.1)
-Requirement already satisfied: multidict<7.0,>=4.5 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (6.0.2)
-Requirement already satisfied: aiosignal>=1.1.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (1.2.0)
-Requirement already satisfied: attrs>=17.3.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (22.1.0)
-Requirement already satisfied: frozenlist>=1.1.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (1.3.1)
-Requirement already satisfied: huggingface-hub<1.0.0,>=0.1.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (0.9.1)
-Requirement already satisfied: pyarrow>=6.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (9.0.0)
-Requirement already satisfied: packaging in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (21.3)
-Requirement already satisfied: fsspec[http]>=2021.05.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (2022.8.2)
-Requirement already satisfied: requests>=2.19.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (2.28.1)
-Requirement already satisfied: responses<0.19 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (0.18.0)
-Requirement already satisfied: smart_open>=1.8.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from gensim>=4.3.0->medcat==1.7.0) (5.2.1)
-Requirement already satisfied: FuzzyTM>=0.4.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from gensim>=4.3.0->medcat==1.7.0) (2.0.5)
-Requirement already satisfied: ipython-genutils~=0.2.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (0.2.0)
-Requirement already satisfied: ipython>=4.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (8.5.0)
-Requirement already satisfied: traitlets>=4.3.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (5.4.0)
-Requirement already satisfied: ipykernel>=4.5.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (6.15.3)
-Requirement already satisfied: jupyterlab-widgets<3,>=1.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (1.1.1)
-Requirement already satisfied: widgetsnbextension~=3.5.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (3.5.2)
-Requirement already satisfied: nbformat>=4.2.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (5.5.0)
-Requirement already satisfied: pytz>=2020.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pandas>=1.4.2->medcat==1.7.0) (2022.2.1)
-Requirement already satisfied: python-dateutil>=2.8.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pandas>=1.4.2->medcat==1.7.0) (2.8.2)
-Requirement already satisfied: pygments>=2.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (2.13.0)
-Requirement already satisfied: pansi>=2020.7.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (2020.7.3)
-Requirement already satisfied: monotonic in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (1.6)
-Requirement already satisfied: six>=1.15.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (1.16.0)
-Requirement already satisfied: urllib3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (1.26.12)
-Requirement already satisfied: interchange~=2021.0.4 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (2021.0.4)
-Requirement already satisfied: certifi in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (2022.9.14)
-Requirement already satisfied: typing-extensions>=4.2.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pydantic>=1.10.0->medcat==1.7.0) (4.3.0)
-Requirement already satisfied: threadpoolctl>=2.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from scikit-learn>=1.1.3->medcat==1.7.0) (3.1.0)
-Requirement already satisfied: joblib>=1.1.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from scikit-learn>=1.1.3->medcat==1.7.0) (1.2.0)
-Requirement already satisfied: langcodes<4.0.0,>=3.2.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (3.3.0)
-Requirement already satisfied: typer<0.8.0,>=0.3.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (0.4.2)
-Requirement already satisfied: catalogue<2.1.0,>=2.0.6 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (2.0.8)
-Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.11 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (3.0.12)
-Requirement already satisfied: pathy>=0.10.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (0.10.1)
-Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (2.0.6)
-Requirement already satisfied: setuptools in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (58.0.4)
-Requirement already satisfied: srsly<3.0.0,>=2.4.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (2.4.4)
-Requirement already satisfied: thinc<8.2.0,>=8.1.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (8.1.8)
-Requirement already satisfied: spacy-loggers<2.0.0,>=1.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (1.0.4)
-Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (3.0.7)
-Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (1.0.8)
-Requirement already satisfied: wasabi<1.2.0,>=0.9.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (0.10.1)
-Requirement already satisfied: jinja2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (3.0.0)
-Requirement already satisfied: tokenizers!=0.11.3,<0.13,>=0.11.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from transformers>=4.19.2->medcat==1.7.0) (0.12.1)
-Requirement already satisfied: pyyaml>=5.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from transformers>=4.19.2->medcat==1.7.0) (6.0)
-Requirement already satisfied: filelock in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from transformers>=4.19.2->medcat==1.7.0) (3.8.0)
-Requirement already satisfied: regex!=2019.12.17 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from transformers>=4.19.2->medcat==1.7.0) (2022.9.13)
-Requirement already satisfied: pyfume in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from FuzzyTM>=0.4.0->gensim>=4.3.0->medcat==1.7.0) (0.2.25)
-Requirement already satisfied: appnope in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (0.1.3)
-Requirement already satisfied: nest-asyncio in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (1.5.5)
-Requirement already satisfied: tornado>=6.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (6.2)
-Requirement already satisfied: matplotlib-inline>=0.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (0.1.6)
-Requirement already satisfied: pyzmq>=17 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (23.2.1)
-Requirement already satisfied: debugpy>=1.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (1.6.3)
-Requirement already satisfied: jupyter-client>=6.1.12 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (7.3.5)
-Requirement already satisfied: stack-data in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.5.0)
-Requirement already satisfied: backcall in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.2.0)
-Requirement already satisfied: pickleshare in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.7.5)
-Requirement already satisfied: decorator in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (5.1.1)
-Requirement already satisfied: pexpect>4.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (4.8.0)
-Requirement already satisfied: prompt-toolkit<3.1.0,>3.0.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (3.0.31)
-Requirement already satisfied: jedi>=0.16 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.18.1)
-Requirement already satisfied: jupyter_core in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbformat>=4.2.0->ipywidgets>=7.6.5->medcat==1.7.0) (4.11.1)
-Requirement already satisfied: fastjsonschema in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbformat>=4.2.0->ipywidgets>=7.6.5->medcat==1.7.0) (2.16.1)
-Requirement already satisfied: jsonschema>=2.6 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbformat>=4.2.0->ipywidgets>=7.6.5->medcat==1.7.0) (4.16.0)
-Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from packaging->datasets>=2.2.2->medcat==1.7.0) (3.0.9)
-Requirement already satisfied: idna<4,>=2.5 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from requests>=2.19.0->datasets>=2.2.2->medcat==1.7.0) (3.4)
-Requirement already satisfied: confection<1.0.0,>=0.0.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from thinc<8.2.0,>=8.1.0->spacy>=3.1.0->medcat==1.7.0) (0.0.4)
-Requirement already satisfied: notebook>=4.4.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (6.4.12)
-Requirement already satisfied: MarkupSafe>=2.0.0rc2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from jinja2->spacy>=3.1.0->medcat==1.7.0) (2.1.1)
-Requirement already satisfied: parso<0.9.0,>=0.8.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from jedi>=0.16->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.8.3)
-Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from jsonschema>=2.6->nbformat>=4.2.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.18.1)
-Requirement already satisfied: entrypoints in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from jupyter-client>=6.1.12->ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (0.4)
-Requirement already satisfied: Send2Trash>=1.8.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (1.8.0)
-Requirement already satisfied: nbconvert>=5 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (5.6.1)
-Requirement already satisfied: terminado>=0.8.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.15.0)
-Requirement already satisfied: prometheus-client in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.14.1)
-Requirement already satisfied: argon2-cffi in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (21.3.0)
-Requirement already satisfied: ptyprocess>=0.5 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pexpect>4.3->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.7.0)
-Requirement already satisfied: wcwidth in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from prompt-toolkit<3.1.0,>3.0.1->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.2.5)
-Requirement already satisfied: simpful in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pyfume->FuzzyTM>=0.4.0->gensim>=4.3.0->medcat==1.7.0) (2.10.0)
-Requirement already satisfied: fst-pso in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pyfume->FuzzyTM>=0.4.0->gensim>=4.3.0->medcat==1.7.0) (1.8.1)
-Requirement already satisfied: executing in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from stack-data->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (1.0.0)
-Requirement already satisfied: pure-eval in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from stack-data->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.2.2)
-Requirement already satisfied: asttokens in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from stack-data->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (2.0.8)
-Requirement already satisfied: mistune<2,>=0.8.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.8.4)
-Requirement already satisfied: testpath in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.6.0)
-Requirement already satisfied: bleach in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (5.0.1)
-Requirement already satisfied: pandocfilters>=1.4.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (1.5.0)
-Requirement already satisfied: defusedxml in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.7.1)
-Requirement already satisfied: argon2-cffi-bindings in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (21.2.0)
-Requirement already satisfied: miniful in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from fst-pso->pyfume->FuzzyTM>=0.4.0->gensim>=4.3.0->medcat==1.7.0) (0.0.6)
-Requirement already satisfied: cffi>=1.0.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from argon2-cffi-bindings->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (1.15.1)
-Requirement already satisfied: webencodings in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from bleach->nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.5.1)
-Requirement already satisfied: pycparser in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (2.21)
-
-[notice] A new release of pip available: 22.2.2 -> 23.0.1
-[notice] To update, run: python -m pip install --upgrade pip
-
-
-
- -
- -
- - -
-
/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/medcat/cat.py:18: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)
-  from tqdm.autonotebook import tqdm, trange
-
-
-
- -
-
- -
-
-
-
-

Generating gold stantard from MedCATtrainer export

After using MedCATtrainer to annotate a number of documents, you can export said annotations. -You can do so by going to the admin page (in default configuration: http://localhost:8001/admin/) and under API click on Project annotate entitiess. -You then want to select the Download action and pick the project(s) you wish to import and click Go to download the export data.

-

For the purposes of this tutorial, we will use some automatically annotated texts.

- -
-
-
-
-
-
In [14]:
-
-
-
! DATA_DIR="./data_regr"
-DATA_DIR = "./data_regr"
-# the file is now included within the repo
-! MCT_EXPORT_FILE=$DATA_DIR"/Keggle_MCT_export.json"
-MCT_EXPORT_FILE = DATA_DIR + "/Keggle_MCT_export.json"
-
- -
-
-
- -
-
- - -
- -
- - -
-
--2023-03-06 16:26:51--  https://gist.githubusercontent.com/mart-r/b22f737856039f0ceec6ffa7bc49f348/raw/d66019379228a77bb35d6bd30a45e0c618ef0c34/Keggle_MCT_export.json
-Resolving gist.githubusercontent.com (gist.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.109.133, ...
-Connecting to gist.githubusercontent.com (gist.githubusercontent.com)|185.199.111.133|:443... connected.
-HTTP request sent, awaiting response... 200 OK
-Length: 134018 (131K) [text/plain]
-Saving to: ‘./data_regr/Keggle_MCT_export.json’
-
-Keggle_MCT_export.j 100%[===================>] 130.88K  --.-KB/s    in 0.02s   
-
-Last-modified header missing -- time-stamps turned off.
-2023-03-06 16:26:51 (6.44 MB/s) - ‘./data_regr/Keggle_MCT_export.json’ saved [134018/134018]
-
-
-
-
- -
-
- -
-
-
-
-

The next step would be to convert said MCT export to the regression suite format. -There is a built in runnable to do that.

-

PS: You may need to pass the --overwrite option to the command below if you're running this multiple times and wish the same files to be overwritten

- -
-
-
-
-
-
In [15]:
-
-
-
! OUTPUT_YAML=$DATA_DIR"/Keggle_regr_suite_output.yml"
-OUTPUT_YAML = DATA_DIR + "/Keggle_regr_suite_output.yml"
-# run converter
-! python -m medcat.utils.regression.mct_converter $MCT_EXPORT_FILE $OUTPUT_YAML --words 20 20 # words before, words after
-
- -
-
-
- -
-
- - -
- -
- - -
-
Starting to convert export JSON to YAML from file data_regr/Keggle_MCT_export.json
-/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/medcat/utils/regression/mct_converter.py:44: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
-  logger.warn("Creating regression suite with no model-card / metadata")
-Creating regression suite with no model-card / metadata
-/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/medcat/utils/regression/mct_converter.py:45: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
-  logger.warn("Please consider passing --modelcard <model card json> or")
-Please consider passing --modelcard <model card json> or
-/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/medcat/utils/regression/mct_converter.py:46: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
-  logger.warn("--model <model zip> to find the model card associated with the regression suite")
---model <model zip> to find the model card associated with the regression suite
-/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/medcat/utils/regression/mct_converter.py:47: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
-  logger.warn("This will help better understand where and how the regression suite was generated")
-This will help better understand where and how the regression suite was generated
-  0%|                                                     | 0/1 [00:00<?, ?it/s]
-  0%|                                                     | 0/5 [00:00<?, ?it/s]
-
-100%|█████████████████████████████████████████| 54/54 [00:00<00:00, 4176.36it/s]
-
-
-100%|█████████████████████████████████████████| 40/40 [00:00<00:00, 1723.02it/s]
-
-
-  0%|                                                   | 0/106 [00:00<?, ?it/s]
-
-100%|████████████████████████████████████████| 106/106 [00:00<00:00, 959.73it/s]
-
- 60%|███████████████████████████                  | 3/5 [00:00<00:00, 20.40it/s]
-
-100%|██████████████████████████████████████████| 58/58 [00:00<00:00, 715.78it/s]
-
-
-  0%|                                                   | 0/104 [00:00<?, ?it/s]
-
-100%|████████████████████████████████████████| 104/104 [00:00<00:00, 551.87it/s]
-100%|█████████████████████████████████████████████| 5/5 [00:00<00:00, 11.99it/s]
-100%|█████████████████████████████████████████████| 1/1 [00:00<00:00,  2.40it/s]
-Saving writing data to data_regr/Keggle_regr_suite_output.yml
-
-
-
- -
-
- -
-
-
-
-

[Optional] Creating category files

We now need to create a category file. -Each category will correspond to a separate regression test set. -So we might want to, for example, separate different domains.

-

In this case, we will use a somewhat arbitrary categories file. -All the CUIs in the example were simply split into a number of different categories based on the CUIs and TUIs available.

- -
-
-
-
-
-
In [16]:
-
-
-
# the file is now included in the repo
-! CATEGORIES_YML=$DATA_DIR"/categories.yml"
-CATEGORIES_YML =  DATA_DIR + "/categories.yml"
-! OUTPUT_SPLIT=$DATA_DIR"/split-"
-OUTPUT_SPLIT = DATA_DIR + "/split-"
-
-# Separate into categories
-! python -m medcat.utils.regression.category_separator $CATEGORIES_YML $OUTPUT_YAML $OUTPUT_SPLIT- --strategy FIRST
-
- -
-
-
- -
-
- - -
- -
- - -
-
--2023-03-06 16:28:33--  https://gist.githubusercontent.com/mart-r/cbcb231a17ce55a0b5cfbec419b168f5/raw/1f9a058abbe15ffbe3a8c1277d6166ab5f1983b5/categories.yml
-Resolving gist.githubusercontent.com (gist.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.109.133, ...
-Connecting to gist.githubusercontent.com (gist.githubusercontent.com)|185.199.111.133|:443... connected.
-HTTP request sent, awaiting response... 200 OK
-Length: 6497 (6.3K) [text/plain]
-Saving to: ‘./data_regr/categories.yml’
-
-categories.yml      100%[===================>]   6.34K  --.-KB/s    in 0s      
-
-Last-modified header missing -- time-stamps turned off.
-2023-03-06 16:28:34 (28.8 MB/s) - ‘./data_regr/categories.yml’ saved [6497/6497]
-
-
-
-
- -
-
- -
-
-
-
-

Run regression tests on one (or many) model(s)

We are now ready to the regression tests on a model. -All we need is a SNOMED based MedCAT model. -You can download the 1.4 model from here.

-

PS: -Make sure to insert the model pack path below in the code if you have your own model

- -
-
-
-
-
-
In [34]:
-
-
-
# we will use the MedMentions model for an example here
-! wget -N https://medcat.rosalind.kcl.ac.uk/media/medmen_wstatus_2021_oct.zip -P $DATA_DIR
-
-# ENTER MODEL PATH for custom model
-! MODEL_PACK_PATH=$DATA_DIR"/medmen_wstatus_2021_oct.zip"
-MODEL_PACK_PATH = DATA_DIR + "/medmen_wstatus_2021_oct.zip"
-
- -
-
-
- -
-
-
-
-

Now, we need to run the regression suite. -You will need to run one of the two commands below depending on whether or not you split the regression suite into multiple parts. -Since the splitting is enabled by default, the other command is commented out for now.

- -
-
-
-
-
-
In [36]:
-
-
-
! echo $OUTPUT_SPLIT"*"
-# ! ls $OUTPUT_SPLIT"*"
-print(OUTPUT_SPLIT)
-# Run regression tests on one (or many) model(s)
-# ! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH $OUTPUT_SPLIT"*"
-# ! python -m medcat.utiil.
-# ! SPLIT_FILES=$OUTPUT_SPLIT"*"
-# SPLIT_FILES = OUTPUT_SPLIT + "*"
-# ! echo python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH $SPLIT_FILES
-# ! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH $SPLIT_FILES
-! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_attributes.yml
-! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_diagnosis.yml
-! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_disorders.yml
-! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_findings-procedures.yml
-! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_medicines.yml
-! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_objects-and-other.yml
-! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_qualifiers.yml
-# or for the ONE regression suite that was downloaded
-# ! python -m medcat.utils>regression.regression_checker.py $MODEL_PACK_PATH $OUTPUT_YAML
-
- -
-
-
- -
-
- - -
- -
- - -
-
./data_regr/split-*
-./data_regr/split-
-WITH ARGUMENTS:
-MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-TSF data_regr/split--_attributes.yml
-SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_attributes.yml']
-Loading RegressionChecker from yaml: data_regr/split--_attributes.yml
-Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate
-  warnings.warn(warn_msg)
-Checking the current status
-100%|███████████████████████████████████████████| 19/19 [00:00<00:00, 70.82it/s]
-A total of 19 parts were kept track of within the group "ALL".
-And a total of 26 (sub)cases were checked.
-        Total success:          19 (73.07692307692308%)
-        Total failure:           7 (26.923076923076923%)
-        	Tested "MartTestAnnotation-associated" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-associated~with" for a total of 3 cases:
-		        Success:             3 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-association" for a total of 2 cases:
-		        Success:             1 (50.0%)
-		        Failure:             1 (50.0%)
-		Tested "MartTestAnnotation-class" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-followed" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-form" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-found~in" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-function" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-group" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-involvement" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-in~addition~to" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-is~a" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-length" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-levels-1" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-present" for a total of 3 cases:
-		        Success:             0 (0.0%)
-		        Failure:             3 (100.0%)
-		Tested "MartTestAnnotation-priority" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-remove" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-use" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-use~of" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-Failures:
-CONCEPT_NOT_ANNOTATED: 7
-Detailed:
-CUI: '263534001', name: 'association', reason: CONCEPT_NOT_ANNOTATED
-CUI: '277064003', name: 'function', reason: CONCEPT_NOT_ANNOTATED
-CUI: '276625007', name: 'levels', reason: CONCEPT_NOT_ANNOTATED
-CUI: '246105001', name: 'present', reason: CONCEPT_NOT_ANNOTATED
-CUI: '246105001', name: 'present', reason: CONCEPT_NOT_ANNOTATED
-CUI: '246105001', name: 'present', reason: CONCEPT_NOT_ANNOTATED
-CUI: '260870009', name: 'priority', reason: CONCEPT_NOT_ANNOTATED
-WITH ARGUMENTS:
-MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-TSF data_regr/split--_diagnosis.yml
-SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_diagnosis.yml']
-Loading RegressionChecker from yaml: data_regr/split--_diagnosis.yml
-Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate
-  warnings.warn(warn_msg)
-Checking the current status
-100%|█████████████████████████████████████████████| 6/6 [00:00<00:00, 26.28it/s]
-A total of 6 parts were kept track of within the group "ALL".
-And a total of 20 (sub)cases were checked.
-        Total success:          17 (85.0%)
-        Total failure:           3 (15.0%)
-        	Tested "MartTestAnnotation-adenocarcinoma" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-margins" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-stenoses" for a total of 10 cases:
-		        Success:            10 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-stenosis" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-tumor" for a total of 5 cases:
-		        Success:             2 (40.0%)
-		        Failure:             3 (60.0%)
-		Tested "MartTestAnnotation-tumors" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-Failures:
-CONCEPT_NOT_ANNOTATED: 1
-INCORRECT_SPAN_BIG: 2
-Detailed:
-CUI: '108369006', name: 'tumor', reason: CONCEPT_NOT_ANNOTATED
-CUI: '108369006', name: 'tumor', reason: INCORRECT_SPAN_BIG (Found: 126949007|acoustic tumor)
-CUI: '108369006', name: 'tumor', reason: INCORRECT_SPAN_BIG (Found: 126949007|acoustic tumor)
-WITH ARGUMENTS:
-MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-TSF data_regr/split--_disorders.yml
-SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_disorders.yml']
-Loading RegressionChecker from yaml: data_regr/split--_disorders.yml
-Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate
-  warnings.warn(warn_msg)
-Checking the current status
-100%|███████████████████████████████████████████| 25/25 [00:00<00:00, 58.01it/s]
-A total of 25 parts were kept track of within the group "ALL".
-And a total of 43 (sub)cases were checked.
-        Total success:          38 (88.37209302325581%)
-        Total failure:           5 (11.627906976744185%)
-        	Tested "MartTestAnnotation-Ann" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-Bronchogenic~carcinoma" for a total of 3 cases:
-		        Success:             3 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-Med" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-Squamous~cell~carcinoma" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-Torsades~de~pointes" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-acoustic~neuroma" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-acoustic~neuromas" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-acoustic~tumor" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-acoustic~tumors" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-aneurysms" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-an~acoustic~neuroma" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-cardiotoxicity" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-celiac" for a total of 7 cases:
-		        Success:             7 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-celiac~artery~stenosis" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-coronary~disease" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-disease" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-hypertension" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-overdose" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-peripheral~vascular~disease" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-polymorphic~ventricular~tachycardia" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-renal" for a total of 4 cases:
-		        Success:             0 (0.0%)
-		        Failure:             4 (100.0%)
-		Tested "MartTestAnnotation-renal~artery~stenoses" for a total of 3 cases:
-		        Success:             3 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-renal~artery~stenosis" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-superior~sulcus~tumors" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-torsades~de~pointes" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-Failures:
-NAME_NOT_FOUND: 1
-INCORRECT_SPAN_BIG: 2
-CONCEPT_NOT_ANNOTATED: 2
-Detailed:
-CUI: '59708000', name: 'Med', reason: NAME_NOT_FOUND (Names for concept: {'med', 'fairbanks~ribbing~epiphy~dyspl', 'multiple~epiphy~dyspl', 'mult~epiphyseal~dysplasia', 'med~multiple~epiphyseal~dysplasia', 'multiple~epiphyseal~dysplasia~syndrome', 'mult~epiphyseal~dysplas', 'multiple~epiphyseal~dysplasia', 'med~multiple~epiphy~dyspl', 'mult~epiphyseal~dyspla', 'multiple~epiphyseal~dysplasia~disorder', 'multiple~epiphyseal~dysplasia~diagnosis', 'dysplasia~epiphyseal~multiple', 'fairbanks~ribbing~type~epiphyseal~dysplasia'})
-CUI: '41368006', name: 'renal', reason: INCORRECT_SPAN_BIG (Found: 302233006|renal artery stenoses)
-CUI: '41368006', name: 'renal', reason: CONCEPT_NOT_ANNOTATED
-CUI: '41368006', name: 'renal', reason: CONCEPT_NOT_ANNOTATED
-CUI: '41368006', name: 'renal', reason: INCORRECT_SPAN_BIG (Found: 302233006|renal artery stenoses)
-WITH ARGUMENTS:
-MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-TSF data_regr/split--_findings-procedures.yml
-SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_findings-procedures.yml']
-Loading RegressionChecker from yaml: data_regr/split--_findings-procedures.yml
-Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate
-  warnings.warn(warn_msg)
-Checking the current status
-100%|███████████████████████████████████████████| 14/14 [00:00<00:00, 64.17it/s]
-A total of 14 parts were kept track of within the group "ALL".
-And a total of 19 (sub)cases were checked.
-        Total success:          18 (94.73684210526316%)
-        Total failure:           1 (5.2631578947368425%)
-        	Tested "MartTestAnnotation-Radiation~therapy" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-aortograms" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-aortography" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-chest~wall~reconstruction" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-computed~tomography" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-hearing" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-magnetic~resonance~imaging" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-mediastinoscopy" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-observation" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-radiation~therapy" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-resected" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-resection" for a total of 6 cases:
-		        Success:             6 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-surgical~removal" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-treated" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-Failures:
-CONCEPT_NOT_ANNOTATED: 1
-Detailed:
-CUI: '398171003', name: 'hearing', reason: CONCEPT_NOT_ANNOTATED
-WITH ARGUMENTS:
-MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-TSF data_regr/split--_medicines.yml
-SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_medicines.yml']
-Loading RegressionChecker from yaml: data_regr/split--_medicines.yml
-Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate
-  warnings.warn(warn_msg)
-Checking the current status
-100%|█████████████████████████████████████████████| 7/7 [00:00<00:00, 50.54it/s]
-A total of 7 parts were kept track of within the group "ALL".
-And a total of 15 (sub)cases were checked.
-        Total success:          13 (86.66666666666667%)
-        Total failure:           2 (13.333333333333334%)
-        	Tested "MartTestAnnotation-Consumer~Product" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-basis" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-cefaclor" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-ketoconazole" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-medroxyprogesterone" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-plasma" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-terfenadine" for a total of 8 cases:
-		        Success:             8 (100.0%)
-		        Failure:             0 (0.0%)
-Failures:
-CONCEPT_NOT_ANNOTATED: 2
-Detailed:
-CUI: '63813000', name: 'basis', reason: CONCEPT_NOT_ANNOTATED
-CUI: '50863008', name: 'plasma', reason: CONCEPT_NOT_ANNOTATED
-WITH ARGUMENTS:
-MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-TSF data_regr/split--_objects-and-other.yml
-SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_objects-and-other.yml']
-Loading RegressionChecker from yaml: data_regr/split--_objects-and-other.yml
-Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate
-  warnings.warn(warn_msg)
-Checking the current status
-100%|█████████████████████████████████████████████| 6/6 [00:00<00:00, 70.67it/s]
-A total of 6 parts were kept track of within the group "ALL".
-And a total of 8 (sub)cases were checked.
-        Total success:           7 (87.5%)
-        Total failure:           1 (12.5%)
-        	Tested "MartTestAnnotation-TASER" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-devices" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-medical~records" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-serum" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-weapon" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-weapons" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-Failures:
-CONCEPT_NOT_ANNOTATED: 1
-Detailed:
-CUI: '119364003', name: 'serum', reason: CONCEPT_NOT_ANNOTATED
-WITH ARGUMENTS:
-MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-TSF data_regr/split--_qualifiers.yml
-SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_qualifiers.yml']
-Loading RegressionChecker from yaml: data_regr/split--_qualifiers.yml
-Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip
-/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate
-  warnings.warn(warn_msg)
-Checking the current status
-100%|███████████████████████████████████████████| 95/95 [00:01<00:00, 74.60it/s]
-A total of 95 parts were kept track of within the group "ALL".
-And a total of 134 (sub)cases were checked.
-        Total success:         119 (88.80597014925372%)
-        Total failure:          15 (11.194029850746269%)
-        	Tested "MartTestAnnotation-Absolute" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-Electronic" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-Lateral" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-Measured" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-Ninety" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-advanced" for a total of 4 cases:
-		        Success:             4 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-approval" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-approved" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-available" for a total of 3 cases:
-		        Success:             3 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-calculations" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-cases" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-clinical" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-close" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-cm" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-common" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-complete" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-concentrations" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-concomitant" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-continues" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-determine" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-diameter" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-divided" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-document" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-documenting" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-dose" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-drug~induced" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-effects" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-efficacy" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-electronic" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-elevated" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-entire" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-evaluation" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-evidence~of" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-excessive" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-grade~I" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-greater" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-greater~than" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-high" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-higher" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-highly" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-inadequate" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-incomplete" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-inhibition" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-initial" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-initially" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-intentional" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-involved" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-law" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-less~than" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-levels" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-limited" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-limits" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-low" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-main" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-major" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-management" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-mean" for a total of 5 cases:
-		        Success:             5 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-median" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-mesenteric" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-minimal" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-negative" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-new" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-not~known" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-number" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-objective" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-occlusive" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-percent" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-period" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-physical" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-planned" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-positive" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-possible" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-post" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-prevalence" for a total of 5 cases:
-		        Success:             5 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-previously" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-prophylactic" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-radiologic" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-recent" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-recommended" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-reduced" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-reported" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-revascularization" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-satisfactory" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-seven" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-significant" for a total of 6 cases:
-		        Success:             6 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-sinusoidal" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-smaller" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-subtotal" for a total of 4 cases:
-		        Success:             3 (75.0%)
-		        Failure:             1 (25.0%)
-		Tested "MartTestAnnotation-surgical" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-symptomatic" for a total of 1 cases:
-		        Success:             1 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-total" for a total of 3 cases:
-		        Success:             3 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-year" for a total of 2 cases:
-		        Success:             2 (100.0%)
-		        Failure:             0 (0.0%)
-		Tested "MartTestAnnotation-yearly" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-years" for a total of 1 cases:
-		        Success:             0 (0.0%)
-		        Failure:             1 (100.0%)
-		Tested "MartTestAnnotation-years-1" for a total of 4 cases:
-		        Success:             3 (75.0%)
-		        Failure:             1 (25.0%)
-Failures:
-CONCEPT_NOT_ANNOTATED: 14
-INCORRECT_SPAN_SMALL: 1
-Detailed:
-CUI: '413769002', name: 'cases', reason: CONCEPT_NOT_ANNOTATED
-CUI: '255594003', name: 'complete', reason: CONCEPT_NOT_ANNOTATED
-CUI: '723051000000101', name: 'evaluation', reason: CONCEPT_NOT_ANNOTATED
-CUI: '419495008', name: 'inhibition', reason: CONCEPT_NOT_ANNOTATED
-CUI: '258395000', name: 'levels', reason: CONCEPT_NOT_ANNOTATED
-CUI: '255603008', name: 'major', reason: CONCEPT_NOT_ANNOTATED
-CUI: '260528009', name: 'median', reason: CONCEPT_NOT_ANNOTATED
-CUI: '255604002', name: 'minimal', reason: CONCEPT_NOT_ANNOTATED
-CUI: '410518001', name: 'objective', reason: CONCEPT_NOT_ANNOTATED
-CUI: '5526005', name: 'radiologic', reason: CONCEPT_NOT_ANNOTATED
-CUI: '733985002', name: 'reported', reason: CONCEPT_NOT_ANNOTATED
-CUI: '255618009', name: 'subtotal', reason: INCORRECT_SPAN_SMALL (Found: 255619001|total)
-CUI: '53281000', name: 'yearly', reason: CONCEPT_NOT_ANNOTATED
-CUI: '259039008', name: 'years', reason: CONCEPT_NOT_ANNOTATED
-CUI: '258707000', name: 'years', reason: CONCEPT_NOT_ANNOTATED
-
-
-
- -
-
- -
-
-
-
-

Now, if you have multiple models, you can compare the results of different models. -There are ways to somewhat automate it, but they are not within the scope of this tutorial. -Check out , instead.

- -
-
-
-
-
- - - - - - diff --git a/v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.ipynb b/v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.ipynb deleted file mode 100644 index e7634823e..000000000 --- a/v1/medcat-tutorials/notebooks/specialised/Comparing_Models_with_RegressionSuite.ipynb +++ /dev/null @@ -1,1133 +0,0 @@ -{ - "cells": [ - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Comparing models using regression test tooling\n", - "Users of MedCAT might find themselves with multiple different models (i.e the same model at various stage of training).\n", - "But it might be unclear which one performs best for their (or someone else's) specific usecase(s).\n", - "This is where the regression test suite built into MedCAT (fully supported starting v1.7.0) can be helpful\n", - "\n", - "The regresion suite tooling has been built with a few objectives in mind\n", - "- Ability to generate metrics on a pre-defined _gold standard_ regression suite(s)\n", - "- Allow users to compare the metrics of different models\n", - "- Provide tooling to make generate regression suites" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The general workflow of the built in regression tooling as follows\n", - "1. Generate a _gold standard_ regression suite (i.e from MedCATtrainer export)\n", - "2. \\[Optional\\] Create relevant categories of CUIs/TUIs/names of concepts\n", - "3. \\[Optional\\] Split the gold standard into multiple regression suites\n", - "4. Run regression tests on one (or many) model(s)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: medcat==1.7.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (1.7.0)\n", - "Requirement already satisfied: torch>=1.13.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.13.1)\n", - "Requirement already satisfied: scikit-learn>=1.1.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.2.1)\n", - "Requirement already satisfied: click>=8.0.4 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (8.0.4)\n", - "Requirement already satisfied: pandas>=1.4.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.4.2)\n", - "Requirement already satisfied: transformers>=4.19.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (4.19.4)\n", - "Requirement already satisfied: blis<0.8.0,>=0.7.8 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (0.7.9)\n", - "Requirement already satisfied: scipy~=1.9.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.9.3)\n", - "Requirement already satisfied: spacy>=3.1.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (3.5.0)\n", - "Requirement already satisfied: gensim>=4.3.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (4.3.0)\n", - "Requirement already satisfied: aiohttp==3.8.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (3.8.3)\n", - "Requirement already satisfied: datasets>=2.2.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (2.2.2)\n", - "Requirement already satisfied: py2neo~=2021.2.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (2021.2.3)\n", - "Requirement already satisfied: ipywidgets>=7.6.5 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (7.6.6)\n", - "Requirement already satisfied: numpy>=1.22.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.23.3)\n", - "Requirement already satisfied: dill>=0.3.4 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (0.3.4)\n", - "Requirement already satisfied: pydantic>=1.10.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (1.10.5)\n", - "Requirement already satisfied: psutil>=5.8.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (5.9.2)\n", - "Requirement already satisfied: xxhash>=3.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (3.0.0)\n", - "Requirement already satisfied: multiprocess~=0.70.12 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (0.70.12)\n", - "Requirement already satisfied: aiofiles>=0.8.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (0.8.0)\n", - "Requirement already satisfied: tqdm>=4.27 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (4.64.1)\n", - "Requirement already satisfied: jsonpickle>=2.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from medcat==1.7.0) (2.0.0)\n", - "Requirement already satisfied: yarl<2.0,>=1.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (1.8.1)\n", - "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (4.0.2)\n", - "Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (2.1.1)\n", - "Requirement already satisfied: multidict<7.0,>=4.5 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (6.0.2)\n", - "Requirement already satisfied: aiosignal>=1.1.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (1.2.0)\n", - "Requirement already satisfied: attrs>=17.3.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (22.1.0)\n", - "Requirement already satisfied: frozenlist>=1.1.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from aiohttp==3.8.3->medcat==1.7.0) (1.3.1)\n", - "Requirement already satisfied: huggingface-hub<1.0.0,>=0.1.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (0.9.1)\n", - "Requirement already satisfied: pyarrow>=6.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (9.0.0)\n", - "Requirement already satisfied: packaging in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (21.3)\n", - "Requirement already satisfied: fsspec[http]>=2021.05.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (2022.8.2)\n", - "Requirement already satisfied: requests>=2.19.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (2.28.1)\n", - "Requirement already satisfied: responses<0.19 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from datasets>=2.2.2->medcat==1.7.0) (0.18.0)\n", - "Requirement already satisfied: smart_open>=1.8.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from gensim>=4.3.0->medcat==1.7.0) (5.2.1)\n", - "Requirement already satisfied: FuzzyTM>=0.4.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from gensim>=4.3.0->medcat==1.7.0) (2.0.5)\n", - "Requirement already satisfied: ipython-genutils~=0.2.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (0.2.0)\n", - "Requirement already satisfied: ipython>=4.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (8.5.0)\n", - "Requirement already satisfied: traitlets>=4.3.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (5.4.0)\n", - "Requirement already satisfied: ipykernel>=4.5.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (6.15.3)\n", - "Requirement already satisfied: jupyterlab-widgets<3,>=1.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (1.1.1)\n", - "Requirement already satisfied: widgetsnbextension~=3.5.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (3.5.2)\n", - "Requirement already satisfied: nbformat>=4.2.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipywidgets>=7.6.5->medcat==1.7.0) (5.5.0)\n", - "Requirement already satisfied: pytz>=2020.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pandas>=1.4.2->medcat==1.7.0) (2022.2.1)\n", - "Requirement already satisfied: python-dateutil>=2.8.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pandas>=1.4.2->medcat==1.7.0) (2.8.2)\n", - "Requirement already satisfied: pygments>=2.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (2.13.0)\n", - "Requirement already satisfied: pansi>=2020.7.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (2020.7.3)\n", - "Requirement already satisfied: monotonic in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (1.6)\n", - "Requirement already satisfied: six>=1.15.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (1.16.0)\n", - "Requirement already satisfied: urllib3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (1.26.12)\n", - "Requirement already satisfied: interchange~=2021.0.4 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (2021.0.4)\n", - "Requirement already satisfied: certifi in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from py2neo~=2021.2.3->medcat==1.7.0) (2022.9.14)\n", - "Requirement already satisfied: typing-extensions>=4.2.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pydantic>=1.10.0->medcat==1.7.0) (4.3.0)\n", - "Requirement already satisfied: threadpoolctl>=2.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from scikit-learn>=1.1.3->medcat==1.7.0) (3.1.0)\n", - "Requirement already satisfied: joblib>=1.1.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from scikit-learn>=1.1.3->medcat==1.7.0) (1.2.0)\n", - "Requirement already satisfied: langcodes<4.0.0,>=3.2.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (3.3.0)\n", - "Requirement already satisfied: typer<0.8.0,>=0.3.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (0.4.2)\n", - "Requirement already satisfied: catalogue<2.1.0,>=2.0.6 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (2.0.8)\n", - "Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.11 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (3.0.12)\n", - "Requirement already satisfied: pathy>=0.10.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (0.10.1)\n", - "Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (2.0.6)\n", - "Requirement already satisfied: setuptools in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (58.0.4)\n", - "Requirement already satisfied: srsly<3.0.0,>=2.4.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (2.4.4)\n", - "Requirement already satisfied: thinc<8.2.0,>=8.1.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (8.1.8)\n", - "Requirement already satisfied: spacy-loggers<2.0.0,>=1.0.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (1.0.4)\n", - "Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (3.0.7)\n", - "Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (1.0.8)\n", - "Requirement already satisfied: wasabi<1.2.0,>=0.9.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (0.10.1)\n", - "Requirement already satisfied: jinja2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from spacy>=3.1.0->medcat==1.7.0) (3.0.0)\n", - "Requirement already satisfied: tokenizers!=0.11.3,<0.13,>=0.11.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from transformers>=4.19.2->medcat==1.7.0) (0.12.1)\n", - "Requirement already satisfied: pyyaml>=5.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from transformers>=4.19.2->medcat==1.7.0) (6.0)\n", - "Requirement already satisfied: filelock in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from transformers>=4.19.2->medcat==1.7.0) (3.8.0)\n", - "Requirement already satisfied: regex!=2019.12.17 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from transformers>=4.19.2->medcat==1.7.0) (2022.9.13)\n", - "Requirement already satisfied: pyfume in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from FuzzyTM>=0.4.0->gensim>=4.3.0->medcat==1.7.0) (0.2.25)\n", - "Requirement already satisfied: appnope in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (0.1.3)\n", - "Requirement already satisfied: nest-asyncio in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (1.5.5)\n", - "Requirement already satisfied: tornado>=6.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (6.2)\n", - "Requirement already satisfied: matplotlib-inline>=0.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (0.1.6)\n", - "Requirement already satisfied: pyzmq>=17 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (23.2.1)\n", - "Requirement already satisfied: debugpy>=1.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (1.6.3)\n", - "Requirement already satisfied: jupyter-client>=6.1.12 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (7.3.5)\n", - "Requirement already satisfied: stack-data in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.5.0)\n", - "Requirement already satisfied: backcall in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.2.0)\n", - "Requirement already satisfied: pickleshare in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.7.5)\n", - "Requirement already satisfied: decorator in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (5.1.1)\n", - "Requirement already satisfied: pexpect>4.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (4.8.0)\n", - "Requirement already satisfied: prompt-toolkit<3.1.0,>3.0.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (3.0.31)\n", - "Requirement already satisfied: jedi>=0.16 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.18.1)\n", - "Requirement already satisfied: jupyter_core in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbformat>=4.2.0->ipywidgets>=7.6.5->medcat==1.7.0) (4.11.1)\n", - "Requirement already satisfied: fastjsonschema in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbformat>=4.2.0->ipywidgets>=7.6.5->medcat==1.7.0) (2.16.1)\n", - "Requirement already satisfied: jsonschema>=2.6 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbformat>=4.2.0->ipywidgets>=7.6.5->medcat==1.7.0) (4.16.0)\n", - "Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from packaging->datasets>=2.2.2->medcat==1.7.0) (3.0.9)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from requests>=2.19.0->datasets>=2.2.2->medcat==1.7.0) (3.4)\n", - "Requirement already satisfied: confection<1.0.0,>=0.0.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from thinc<8.2.0,>=8.1.0->spacy>=3.1.0->medcat==1.7.0) (0.0.4)\n", - "Requirement already satisfied: notebook>=4.4.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (6.4.12)\n", - "Requirement already satisfied: MarkupSafe>=2.0.0rc2 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from jinja2->spacy>=3.1.0->medcat==1.7.0) (2.1.1)\n", - "Requirement already satisfied: parso<0.9.0,>=0.8.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from jedi>=0.16->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.8.3)\n", - "Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from jsonschema>=2.6->nbformat>=4.2.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.18.1)\n", - "Requirement already satisfied: entrypoints in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from jupyter-client>=6.1.12->ipykernel>=4.5.1->ipywidgets>=7.6.5->medcat==1.7.0) (0.4)\n", - "Requirement already satisfied: Send2Trash>=1.8.0 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (1.8.0)\n", - "Requirement already satisfied: nbconvert>=5 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (5.6.1)\n", - "Requirement already satisfied: terminado>=0.8.3 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.15.0)\n", - "Requirement already satisfied: prometheus-client in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.14.1)\n", - "Requirement already satisfied: argon2-cffi in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (21.3.0)\n", - "Requirement already satisfied: ptyprocess>=0.5 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pexpect>4.3->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.7.0)\n", - "Requirement already satisfied: wcwidth in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from prompt-toolkit<3.1.0,>3.0.1->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.2.5)\n", - "Requirement already satisfied: simpful in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pyfume->FuzzyTM>=0.4.0->gensim>=4.3.0->medcat==1.7.0) (2.10.0)\n", - "Requirement already satisfied: fst-pso in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from pyfume->FuzzyTM>=0.4.0->gensim>=4.3.0->medcat==1.7.0) (1.8.1)\n", - "Requirement already satisfied: executing in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from stack-data->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (1.0.0)\n", - "Requirement already satisfied: pure-eval in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from stack-data->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.2.2)\n", - "Requirement already satisfied: asttokens in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from stack-data->ipython>=4.0.0->ipywidgets>=7.6.5->medcat==1.7.0) (2.0.8)\n", - "Requirement already satisfied: mistune<2,>=0.8.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.8.4)\n", - "Requirement already satisfied: testpath in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.6.0)\n", - "Requirement already satisfied: bleach in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (5.0.1)\n", - "Requirement already satisfied: pandocfilters>=1.4.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (1.5.0)\n", - "Requirement already satisfied: defusedxml in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.7.1)\n", - "Requirement already satisfied: argon2-cffi-bindings in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (21.2.0)\n", - "Requirement already satisfied: miniful in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from fst-pso->pyfume->FuzzyTM>=0.4.0->gensim>=4.3.0->medcat==1.7.0) (0.0.6)\n", - "Requirement already satisfied: cffi>=1.0.1 in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from argon2-cffi-bindings->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (1.15.1)\n", - "Requirement already satisfied: webencodings in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from bleach->nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (0.5.1)\n", - "Requirement already satisfied: pycparser in /Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.5->medcat==1.7.0) (2.21)\n", - "\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip available: \u001b[0m\u001b[31;49m22.2.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.0.1\u001b[0m\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpython -m pip install --upgrade pip\u001b[0m\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/medcat/cat.py:18: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n", - " from tqdm.autonotebook import tqdm, trange\n" - ] - } - ], - "source": [ - "# Install medcat\n", - "! pip install medcat~=1.16.0 # regression suite fully available starting version 1.7.0\n", - "try:\n", - " from medcat.cat import CAT\n", - "except:\n", - " print(\"WARNING: Runtime will restart automatically and please run other cells thereafter.\")\n", - " exit()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Generating _gold stantard_ from MedCATtrainer export\n", - "After using MedCATtrainer to annotate a number of documents, you can export said annotations.\n", - "You can do so by going to the admin page (in default configuration: `http://localhost:8001/admin/`) and under _API_ click on _Project annotate entitiess_.\n", - "You then want to select the _Download_ action and pick the project(s) you wish to import and click _Go_ to download the export data.\n", - "\n", - "For the purposes of this tutorial, we will use some automatically annotated texts." - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "--2023-03-06 16:26:51-- https://gist.githubusercontent.com/mart-r/b22f737856039f0ceec6ffa7bc49f348/raw/d66019379228a77bb35d6bd30a45e0c618ef0c34/Keggle_MCT_export.json\n", - "Resolving gist.githubusercontent.com (gist.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.109.133, ...\n", - "Connecting to gist.githubusercontent.com (gist.githubusercontent.com)|185.199.111.133|:443... connected.\n", - "HTTP request sent, awaiting response... 200 OK\n", - "Length: 134018 (131K) [text/plain]\n", - "Saving to: ‘./data_regr/Keggle_MCT_export.json’\n", - "\n", - "Keggle_MCT_export.j 100%[===================>] 130.88K --.-KB/s in 0.02s \n", - "\n", - "Last-modified header missing -- time-stamps turned off.\n", - "2023-03-06 16:26:51 (6.44 MB/s) - ‘./data_regr/Keggle_MCT_export.json’ saved [134018/134018]\n", - "\n" - ] - } - ], - "source": [ - "! DATA_DIR=\"./data_regr\"\n", - "DATA_DIR = \"./data_regr\"\n", - "# the file is now included within the repo\n", - "! MCT_EXPORT_FILE=$DATA_DIR\"/Keggle_MCT_export.json\"\n", - "MCT_EXPORT_FILE = DATA_DIR + \"/Keggle_MCT_export.json\"\n" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The next step would be to convert said MCT export to the regression suite format.\n", - "There is a built in runnable to do that.\n", - "\n", - "PS: You may need to pass the `--overwrite` option to the command below if you're running this multiple times and wish the same files to be overwritten" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Starting to convert export JSON to YAML from file data_regr/Keggle_MCT_export.json\n", - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/medcat/utils/regression/mct_converter.py:44: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead\n", - " logger.warn(\"Creating regression suite with no model-card / metadata\")\n", - "Creating regression suite with no model-card / metadata\n", - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/medcat/utils/regression/mct_converter.py:45: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead\n", - " logger.warn(\"Please consider passing --modelcard or\")\n", - "Please consider passing --modelcard or\n", - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/medcat/utils/regression/mct_converter.py:46: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead\n", - " logger.warn(\"--model to find the model card associated with the regression suite\")\n", - "--model to find the model card associated with the regression suite\n", - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/medcat/utils/regression/mct_converter.py:47: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead\n", - " logger.warn(\"This will help better understand where and how the regression suite was generated\")\n", - "This will help better understand where and how the regression suite was generated\n", - " 0%| | 0/1 [00:00] 6.34K --.-KB/s in 0s \n", - "\n", - "Last-modified header missing -- time-stamps turned off.\n", - "2023-03-06 16:28:34 (28.8 MB/s) - ‘./data_regr/categories.yml’ saved [6497/6497]\n", - "\n" - ] - } - ], - "source": [ - "# the file is now included in the repo\n", - "! CATEGORIES_YML=$DATA_DIR\"/categories.yml\"\n", - "CATEGORIES_YML = DATA_DIR + \"/categories.yml\"\n", - "! OUTPUT_SPLIT=$DATA_DIR\"/split-\"\n", - "OUTPUT_SPLIT = DATA_DIR + \"/split-\"\n", - "\n", - "# Separate into categories\n", - "! python -m medcat.utils.regression.category_separator $CATEGORIES_YML $OUTPUT_YAML $OUTPUT_SPLIT- --strategy FIRST" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Run regression tests on one (or many) model(s)\n", - "\n", - "We are now ready to the regression tests on a model.\n", - "All we need is a SNOMED based MedCAT model.\n", - "You can download the 1.4 model from [here](https://uts.nlm.nih.gov/uts/login?service=https:%2F%2Fmedcat.rosalind.kcl.ac.uk%2Fauth-callback).\n", - "\n", - "PS:\n", - "**Make sure to insert the model pack path below in the code if you have your own model**" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [], - "source": [ - "# we will use the MedMentions model for an example here\n", - "! wget -N https://medcat.rosalind.kcl.ac.uk/media/medmen_wstatus_2021_oct.zip -P $DATA_DIR\n", - "\n", - "# ENTER MODEL PATH for custom model\n", - "! MODEL_PACK_PATH=$DATA_DIR\"/medmen_wstatus_2021_oct.zip\"\n", - "MODEL_PACK_PATH = DATA_DIR + \"/medmen_wstatus_2021_oct.zip\"" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now, we need to run the regression suite.\n", - "You will need to run one of the two commands below depending on whether or not you split the regression suite into multiple parts.\n", - "Since the splitting is enabled by default, the other command is commented out for now." - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "./data_regr/split-*\n", - "./data_regr/split-\n", - "WITH ARGUMENTS:\n", - "MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "TSF data_regr/split--_attributes.yml\n", - "SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_attributes.yml']\n", - "Loading RegressionChecker from yaml: data_regr/split--_attributes.yml\n", - "Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate\n", - " warnings.warn(warn_msg)\n", - "Checking the current status\n", - "100%|███████████████████████████████████████████| 19/19 [00:00<00:00, 70.82it/s]\n", - "A total of 19 parts were kept track of within the group \"ALL\".\n", - "And a total of 26 (sub)cases were checked.\n", - " Total success: 19 (73.07692307692308%)\n", - " Total failure: 7 (26.923076923076923%)\n", - " \tTested \"MartTestAnnotation-associated\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-associated~with\" for a total of 3 cases:\n", - "\t\t Success: 3 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-association\" for a total of 2 cases:\n", - "\t\t Success: 1 (50.0%)\n", - "\t\t Failure: 1 (50.0%)\n", - "\t\tTested \"MartTestAnnotation-class\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-followed\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-form\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-found~in\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-function\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-group\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-involvement\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-in~addition~to\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-is~a\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-length\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-levels-1\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-present\" for a total of 3 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 3 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-priority\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-remove\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-use\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-use~of\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "Failures:\n", - "CONCEPT_NOT_ANNOTATED: 7\n", - "Detailed:\n", - "CUI: '263534001', name: 'association', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '277064003', name: 'function', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '276625007', name: 'levels', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '246105001', name: 'present', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '246105001', name: 'present', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '246105001', name: 'present', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '260870009', name: 'priority', reason: CONCEPT_NOT_ANNOTATED\n", - "WITH ARGUMENTS:\n", - "MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "TSF data_regr/split--_diagnosis.yml\n", - "SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_diagnosis.yml']\n", - "Loading RegressionChecker from yaml: data_regr/split--_diagnosis.yml\n", - "Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate\n", - " warnings.warn(warn_msg)\n", - "Checking the current status\n", - "100%|█████████████████████████████████████████████| 6/6 [00:00<00:00, 26.28it/s]\n", - "A total of 6 parts were kept track of within the group \"ALL\".\n", - "And a total of 20 (sub)cases were checked.\n", - " Total success: 17 (85.0%)\n", - " Total failure: 3 (15.0%)\n", - " \tTested \"MartTestAnnotation-adenocarcinoma\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-margins\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-stenoses\" for a total of 10 cases:\n", - "\t\t Success: 10 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-stenosis\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-tumor\" for a total of 5 cases:\n", - "\t\t Success: 2 (40.0%)\n", - "\t\t Failure: 3 (60.0%)\n", - "\t\tTested \"MartTestAnnotation-tumors\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "Failures:\n", - "CONCEPT_NOT_ANNOTATED: 1\n", - "INCORRECT_SPAN_BIG: 2\n", - "Detailed:\n", - "CUI: '108369006', name: 'tumor', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '108369006', name: 'tumor', reason: INCORRECT_SPAN_BIG (Found: 126949007|acoustic tumor)\n", - "CUI: '108369006', name: 'tumor', reason: INCORRECT_SPAN_BIG (Found: 126949007|acoustic tumor)\n", - "WITH ARGUMENTS:\n", - "MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "TSF data_regr/split--_disorders.yml\n", - "SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_disorders.yml']\n", - "Loading RegressionChecker from yaml: data_regr/split--_disorders.yml\n", - "Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate\n", - " warnings.warn(warn_msg)\n", - "Checking the current status\n", - "100%|███████████████████████████████████████████| 25/25 [00:00<00:00, 58.01it/s]\n", - "A total of 25 parts were kept track of within the group \"ALL\".\n", - "And a total of 43 (sub)cases were checked.\n", - " Total success: 38 (88.37209302325581%)\n", - " Total failure: 5 (11.627906976744185%)\n", - " \tTested \"MartTestAnnotation-Ann\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-Bronchogenic~carcinoma\" for a total of 3 cases:\n", - "\t\t Success: 3 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-Med\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-Squamous~cell~carcinoma\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-Torsades~de~pointes\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-acoustic~neuroma\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-acoustic~neuromas\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-acoustic~tumor\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-acoustic~tumors\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-aneurysms\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-an~acoustic~neuroma\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-cardiotoxicity\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-celiac\" for a total of 7 cases:\n", - "\t\t Success: 7 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-celiac~artery~stenosis\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-coronary~disease\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-disease\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-hypertension\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-overdose\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-peripheral~vascular~disease\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-polymorphic~ventricular~tachycardia\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-renal\" for a total of 4 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 4 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-renal~artery~stenoses\" for a total of 3 cases:\n", - "\t\t Success: 3 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-renal~artery~stenosis\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-superior~sulcus~tumors\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-torsades~de~pointes\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "Failures:\n", - "NAME_NOT_FOUND: 1\n", - "INCORRECT_SPAN_BIG: 2\n", - "CONCEPT_NOT_ANNOTATED: 2\n", - "Detailed:\n", - "CUI: '59708000', name: 'Med', reason: NAME_NOT_FOUND (Names for concept: {'med', 'fairbanks~ribbing~epiphy~dyspl', 'multiple~epiphy~dyspl', 'mult~epiphyseal~dysplasia', 'med~multiple~epiphyseal~dysplasia', 'multiple~epiphyseal~dysplasia~syndrome', 'mult~epiphyseal~dysplas', 'multiple~epiphyseal~dysplasia', 'med~multiple~epiphy~dyspl', 'mult~epiphyseal~dyspla', 'multiple~epiphyseal~dysplasia~disorder', 'multiple~epiphyseal~dysplasia~diagnosis', 'dysplasia~epiphyseal~multiple', 'fairbanks~ribbing~type~epiphyseal~dysplasia'})\n", - "CUI: '41368006', name: 'renal', reason: INCORRECT_SPAN_BIG (Found: 302233006|renal artery stenoses)\n", - "CUI: '41368006', name: 'renal', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '41368006', name: 'renal', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '41368006', name: 'renal', reason: INCORRECT_SPAN_BIG (Found: 302233006|renal artery stenoses)\n", - "WITH ARGUMENTS:\n", - "MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "TSF data_regr/split--_findings-procedures.yml\n", - "SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_findings-procedures.yml']\n", - "Loading RegressionChecker from yaml: data_regr/split--_findings-procedures.yml\n", - "Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate\n", - " warnings.warn(warn_msg)\n", - "Checking the current status\n", - "100%|███████████████████████████████████████████| 14/14 [00:00<00:00, 64.17it/s]\n", - "A total of 14 parts were kept track of within the group \"ALL\".\n", - "And a total of 19 (sub)cases were checked.\n", - " Total success: 18 (94.73684210526316%)\n", - " Total failure: 1 (5.2631578947368425%)\n", - " \tTested \"MartTestAnnotation-Radiation~therapy\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-aortograms\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-aortography\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-chest~wall~reconstruction\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-computed~tomography\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-hearing\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-magnetic~resonance~imaging\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-mediastinoscopy\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-observation\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-radiation~therapy\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-resected\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-resection\" for a total of 6 cases:\n", - "\t\t Success: 6 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-surgical~removal\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-treated\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "Failures:\n", - "CONCEPT_NOT_ANNOTATED: 1\n", - "Detailed:\n", - "CUI: '398171003', name: 'hearing', reason: CONCEPT_NOT_ANNOTATED\n", - "WITH ARGUMENTS:\n", - "MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "TSF data_regr/split--_medicines.yml\n", - "SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_medicines.yml']\n", - "Loading RegressionChecker from yaml: data_regr/split--_medicines.yml\n", - "Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate\n", - " warnings.warn(warn_msg)\n", - "Checking the current status\n", - "100%|█████████████████████████████████████████████| 7/7 [00:00<00:00, 50.54it/s]\n", - "A total of 7 parts were kept track of within the group \"ALL\".\n", - "And a total of 15 (sub)cases were checked.\n", - " Total success: 13 (86.66666666666667%)\n", - " Total failure: 2 (13.333333333333334%)\n", - " \tTested \"MartTestAnnotation-Consumer~Product\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-basis\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-cefaclor\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-ketoconazole\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-medroxyprogesterone\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-plasma\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-terfenadine\" for a total of 8 cases:\n", - "\t\t Success: 8 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "Failures:\n", - "CONCEPT_NOT_ANNOTATED: 2\n", - "Detailed:\n", - "CUI: '63813000', name: 'basis', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '50863008', name: 'plasma', reason: CONCEPT_NOT_ANNOTATED\n", - "WITH ARGUMENTS:\n", - "MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "TSF data_regr/split--_objects-and-other.yml\n", - "SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_objects-and-other.yml']\n", - "Loading RegressionChecker from yaml: data_regr/split--_objects-and-other.yml\n", - "Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate\n", - " warnings.warn(warn_msg)\n", - "Checking the current status\n", - "100%|█████████████████████████████████████████████| 6/6 [00:00<00:00, 70.67it/s]\n", - "A total of 6 parts were kept track of within the group \"ALL\".\n", - "And a total of 8 (sub)cases were checked.\n", - " Total success: 7 (87.5%)\n", - " Total failure: 1 (12.5%)\n", - " \tTested \"MartTestAnnotation-TASER\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-devices\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-medical~records\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-serum\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-weapon\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-weapons\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "Failures:\n", - "CONCEPT_NOT_ANNOTATED: 1\n", - "Detailed:\n", - "CUI: '119364003', name: 'serum', reason: CONCEPT_NOT_ANNOTATED\n", - "WITH ARGUMENTS:\n", - "MPD ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "TSF data_regr/split--_qualifiers.yml\n", - "SYS ARGS: ['../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip', './data_regr/split--_qualifiers.yml']\n", - "Loading RegressionChecker from yaml: data_regr/split--_qualifiers.yml\n", - "Loading model pack from file: ../../../working_with_cogstack/data/medcat_models/modelpack/20221004_trained_model_supervised_latest_acd0dfc2f0df45de.zip\n", - "/Users/martratas/Documents/CogStack/.MedCAT.nosync/MedCATtutorials/tvenv/lib/python3.9/site-packages/spacy/util.py:877: UserWarning: [W095] Model 'en_core_web_md' (3.1.0) was trained with spaCy v3.1 and may not be 100% compatible with the current version (3.5.0). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate\n", - " warnings.warn(warn_msg)\n", - "Checking the current status\n", - "100%|███████████████████████████████████████████| 95/95 [00:01<00:00, 74.60it/s]\n", - "A total of 95 parts were kept track of within the group \"ALL\".\n", - "And a total of 134 (sub)cases were checked.\n", - " Total success: 119 (88.80597014925372%)\n", - " Total failure: 15 (11.194029850746269%)\n", - " \tTested \"MartTestAnnotation-Absolute\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-Electronic\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-Lateral\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-Measured\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-Ninety\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-advanced\" for a total of 4 cases:\n", - "\t\t Success: 4 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-approval\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-approved\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-available\" for a total of 3 cases:\n", - "\t\t Success: 3 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-calculations\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-cases\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-clinical\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-close\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-cm\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-common\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-complete\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-concentrations\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-concomitant\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-continues\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-determine\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-diameter\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-divided\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-document\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-documenting\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-dose\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-drug~induced\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-effects\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-efficacy\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-electronic\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-elevated\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-entire\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-evaluation\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-evidence~of\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-excessive\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-grade~I\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-greater\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-greater~than\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-high\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-higher\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-highly\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-inadequate\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-incomplete\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-inhibition\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-initial\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-initially\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-intentional\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-involved\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-law\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-less~than\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-levels\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-limited\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-limits\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-low\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-main\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-major\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-management\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-mean\" for a total of 5 cases:\n", - "\t\t Success: 5 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-median\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-mesenteric\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-minimal\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-negative\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-new\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-not~known\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-number\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-objective\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-occlusive\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-percent\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-period\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-physical\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-planned\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-positive\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-possible\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-post\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-prevalence\" for a total of 5 cases:\n", - "\t\t Success: 5 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-previously\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-prophylactic\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-radiologic\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-recent\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-recommended\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-reduced\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-reported\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-revascularization\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-satisfactory\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-seven\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-significant\" for a total of 6 cases:\n", - "\t\t Success: 6 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-sinusoidal\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-smaller\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-subtotal\" for a total of 4 cases:\n", - "\t\t Success: 3 (75.0%)\n", - "\t\t Failure: 1 (25.0%)\n", - "\t\tTested \"MartTestAnnotation-surgical\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-symptomatic\" for a total of 1 cases:\n", - "\t\t Success: 1 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-total\" for a total of 3 cases:\n", - "\t\t Success: 3 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-year\" for a total of 2 cases:\n", - "\t\t Success: 2 (100.0%)\n", - "\t\t Failure: 0 (0.0%)\n", - "\t\tTested \"MartTestAnnotation-yearly\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-years\" for a total of 1 cases:\n", - "\t\t Success: 0 (0.0%)\n", - "\t\t Failure: 1 (100.0%)\n", - "\t\tTested \"MartTestAnnotation-years-1\" for a total of 4 cases:\n", - "\t\t Success: 3 (75.0%)\n", - "\t\t Failure: 1 (25.0%)\n", - "Failures:\n", - "CONCEPT_NOT_ANNOTATED: 14\n", - "INCORRECT_SPAN_SMALL: 1\n", - "Detailed:\n", - "CUI: '413769002', name: 'cases', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '255594003', name: 'complete', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '723051000000101', name: 'evaluation', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '419495008', name: 'inhibition', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '258395000', name: 'levels', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '255603008', name: 'major', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '260528009', name: 'median', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '255604002', name: 'minimal', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '410518001', name: 'objective', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '5526005', name: 'radiologic', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '733985002', name: 'reported', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '255618009', name: 'subtotal', reason: INCORRECT_SPAN_SMALL (Found: 255619001|total)\n", - "CUI: '53281000', name: 'yearly', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '259039008', name: 'years', reason: CONCEPT_NOT_ANNOTATED\n", - "CUI: '258707000', name: 'years', reason: CONCEPT_NOT_ANNOTATED\n" - ] - } - ], - "source": [ - "! echo $OUTPUT_SPLIT\"*\"\n", - "# ! ls $OUTPUT_SPLIT\"*\"\n", - "print(OUTPUT_SPLIT)\n", - "# Run regression tests on one (or many) model(s)\n", - "# ! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH $OUTPUT_SPLIT\"*\"\n", - "# ! python -m medcat.utiil.\n", - "# ! SPLIT_FILES=$OUTPUT_SPLIT\"*\"\n", - "# SPLIT_FILES = OUTPUT_SPLIT + \"*\"\n", - "# ! echo python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH $SPLIT_FILES\n", - "# ! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH $SPLIT_FILES\n", - "! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_attributes.yml\n", - "! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_diagnosis.yml\n", - "! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_disorders.yml\n", - "! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_findings-procedures.yml\n", - "! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_medicines.yml\n", - "! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_objects-and-other.yml\n", - "! python -m medcat.utils.regression.regression_checker $MODEL_PACK_PATH ./data_regr/split--_qualifiers.yml\n", - "# or for the ONE regression suite that was downloaded\n", - "# ! python -m medcat.utils>regression.regression_checker.py $MODEL_PACK_PATH $OUTPUT_YAML" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now, if you have multiple models, you can compare the results of different models.\n", - "There are ways to somewhat automate it, but they are not within the scope of this tutorial.\n", - "Check out , instead." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "tvenv", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.6" - }, - "vscode": { - "interpreter": { - "hash": "1bc8b3f776ee174f04278144253a5120defca4d12795f96011b79020571ad2f3" - } - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} From 67556e87d1f8dc8e5db74061fa044b959cce89b4 Mon Sep 17 00:00:00 2001 From: Mart Ratas Date: Mon, 12 Oct 2026 10:29:28 +0100 Subject: [PATCH 3/4] Update all install targets to force older pyarrow for numpy compatibility --- .../introductory/Part_1_1_OPTIONAL_Logging_With_MedCAT.ipynb | 2 +- .../Part_3_1_Building_a_Concept_Database_and_Vocabulary.ipynb | 2 +- .../Part_4_1_ByteLevelBPETokenizer_and_Embeddings.ipynb | 2 +- .../Part_4_2_Supervised_Training_and_Meta_annotations.ipynb | 2 +- ...nts_with_the_full_MedCAT_pipeline_with_MetaAnnotations.ipynb | 2 +- .../Part_5_Prevalence_of_Physical_and_Mental_Diseases.ipynb | 2 +- .../Part_6_1_Supervised_Training_Relation_Extraction.ipynb | 2 +- ...ering_relations_from_annotations_with_Relation_toolkit.ipynb | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/v1/medcat-tutorials/notebooks/introductory/Part_1_1_OPTIONAL_Logging_With_MedCAT.ipynb b/v1/medcat-tutorials/notebooks/introductory/Part_1_1_OPTIONAL_Logging_With_MedCAT.ipynb index 4d8c271c2..029f7de78 100644 --- a/v1/medcat-tutorials/notebooks/introductory/Part_1_1_OPTIONAL_Logging_With_MedCAT.ipynb +++ b/v1/medcat-tutorials/notebooks/introductory/Part_1_1_OPTIONAL_Logging_With_MedCAT.ipynb @@ -19,7 +19,7 @@ "outputs": [], "source": [ "# Install medcat\n", - "! pip install medcat~=1.16.0\n", + "! pip install \"medcat~=1.16.0\" \"pyarrow<26.0\"\n", "try:\n", " from medcat.cat import CAT\n", "except:\n", diff --git a/v1/medcat-tutorials/notebooks/introductory/Part_3_1_Building_a_Concept_Database_and_Vocabulary.ipynb b/v1/medcat-tutorials/notebooks/introductory/Part_3_1_Building_a_Concept_Database_and_Vocabulary.ipynb index 6c3412b9e..dfd9957b8 100644 --- a/v1/medcat-tutorials/notebooks/introductory/Part_3_1_Building_a_Concept_Database_and_Vocabulary.ipynb +++ b/v1/medcat-tutorials/notebooks/introductory/Part_3_1_Building_a_Concept_Database_and_Vocabulary.ipynb @@ -322,7 +322,7 @@ ], "source": [ "# Install MedCAT\n", - "! pip install medcat~=1.16.0\n", + "! pip install \"medcat~=1.16.0\" \"pyarrow<26.0\"\n", "# Get the scispacy model\n", "! python -m spacy download en_core_web_md\n", "try:\n", diff --git a/v1/medcat-tutorials/notebooks/introductory/Part_4_1_ByteLevelBPETokenizer_and_Embeddings.ipynb b/v1/medcat-tutorials/notebooks/introductory/Part_4_1_ByteLevelBPETokenizer_and_Embeddings.ipynb index b00cb03a7..c21afb5fc 100644 --- a/v1/medcat-tutorials/notebooks/introductory/Part_4_1_ByteLevelBPETokenizer_and_Embeddings.ipynb +++ b/v1/medcat-tutorials/notebooks/introductory/Part_4_1_ByteLevelBPETokenizer_and_Embeddings.ipynb @@ -272,7 +272,7 @@ ], "source": [ "# Install medcat\n", - "! pip install medcat~=1.16.0\n", + "! pip install \"medcat~=1.16.0\" \"pyarrow<26.0\"\n", "try:\n", " from medcat.cat import CAT\n", "except:\n", diff --git a/v1/medcat-tutorials/notebooks/introductory/Part_4_2_Supervised_Training_and_Meta_annotations.ipynb b/v1/medcat-tutorials/notebooks/introductory/Part_4_2_Supervised_Training_and_Meta_annotations.ipynb index 7d120a5b2..8528dcdef 100644 --- a/v1/medcat-tutorials/notebooks/introductory/Part_4_2_Supervised_Training_and_Meta_annotations.ipynb +++ b/v1/medcat-tutorials/notebooks/introductory/Part_4_2_Supervised_Training_and_Meta_annotations.ipynb @@ -331,7 +331,7 @@ ], "source": [ "# Install medcat\n", - "! pip install medcat~=1.16.0\n", + "! pip install \"medcat~=1.16.0\" \"pyarrow<26.0\"\n", "# Get the spacy model\n", "! python -m spacy download en_core_web_md\n", "try:\n", diff --git a/v1/medcat-tutorials/notebooks/introductory/Part_4_3_Annotating_documents_with_the_full_MedCAT_pipeline_with_MetaAnnotations.ipynb b/v1/medcat-tutorials/notebooks/introductory/Part_4_3_Annotating_documents_with_the_full_MedCAT_pipeline_with_MetaAnnotations.ipynb index 3f723597d..f0e1d6244 100644 --- a/v1/medcat-tutorials/notebooks/introductory/Part_4_3_Annotating_documents_with_the_full_MedCAT_pipeline_with_MetaAnnotations.ipynb +++ b/v1/medcat-tutorials/notebooks/introductory/Part_4_3_Annotating_documents_with_the_full_MedCAT_pipeline_with_MetaAnnotations.ipynb @@ -265,7 +265,7 @@ ], "source": [ "# Install medcat\n", - "! pip install medcat~=1.16.0\n", + "! pip install \"medcat~=1.16.0\" \"pyarrow<26.0\"\n", "# install seaborn\n", "! pip install seaborn\n", "try:\n", diff --git a/v1/medcat-tutorials/notebooks/introductory/Part_5_Prevalence_of_Physical_and_Mental_Diseases.ipynb b/v1/medcat-tutorials/notebooks/introductory/Part_5_Prevalence_of_Physical_and_Mental_Diseases.ipynb index 7db899026..b3eb99e81 100644 --- a/v1/medcat-tutorials/notebooks/introductory/Part_5_Prevalence_of_Physical_and_Mental_Diseases.ipynb +++ b/v1/medcat-tutorials/notebooks/introductory/Part_5_Prevalence_of_Physical_and_Mental_Diseases.ipynb @@ -265,7 +265,7 @@ ], "source": [ "# Install medcat\n", - "! pip install medcat~=1.16.0\n", + "! pip install \"medcat~=1.16.0\" \"pyarrow<26.0\"\n", "# install seaborn\n", "! pip install seaborn\n", "try:\n", diff --git a/v1/medcat-tutorials/notebooks/introductory/Part_6_1_Supervised_Training_Relation_Extraction.ipynb b/v1/medcat-tutorials/notebooks/introductory/Part_6_1_Supervised_Training_Relation_Extraction.ipynb index bdab84d0d..98b18fa2e 100644 --- a/v1/medcat-tutorials/notebooks/introductory/Part_6_1_Supervised_Training_Relation_Extraction.ipynb +++ b/v1/medcat-tutorials/notebooks/introductory/Part_6_1_Supervised_Training_Relation_Extraction.ipynb @@ -140,7 +140,7 @@ ], "source": [ "# Install medcat\n", - "! pip install medcat~=1.16.0" + "! pip install \"medcat~=1.16.0\" \"pyarrow<26.0\"" ] }, { diff --git a/v1/medcat-tutorials/notebooks/introductory/Part_6_2_Infering_relations_from_annotations_with_Relation_toolkit.ipynb b/v1/medcat-tutorials/notebooks/introductory/Part_6_2_Infering_relations_from_annotations_with_Relation_toolkit.ipynb index 0a46667f8..ca955b30d 100644 --- a/v1/medcat-tutorials/notebooks/introductory/Part_6_2_Infering_relations_from_annotations_with_Relation_toolkit.ipynb +++ b/v1/medcat-tutorials/notebooks/introductory/Part_6_2_Infering_relations_from_annotations_with_Relation_toolkit.ipynb @@ -123,7 +123,7 @@ ], "source": [ "# Install medcat\n", - "! pip install medcat~=1.16.0" + "! pip install \"medcat~=1.16.0\" \"pyarrow<26.0\"" ] }, { From a4f881e76405626d26f3c64209fd7aa1aa904c0d Mon Sep 17 00:00:00 2001 From: Mart Ratas Date: Mon, 12 Oct 2026 12:24:56 +0100 Subject: [PATCH 4/4] Don't allow latest pyarrow for v1 trainer either --- v1/medcat-trainer/webapp/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/v1/medcat-trainer/webapp/requirements.txt b/v1/medcat-trainer/webapp/requirements.txt index 197a4854d..e0948e7b9 100644 --- a/v1/medcat-trainer/webapp/requirements.txt +++ b/v1/medcat-trainer/webapp/requirements.txt @@ -7,4 +7,5 @@ djangorestframework==3.15.* django-background-tasks-updated==1.2.* openpyxl==3.1.2 medcat==1.16.* +pyarrow<26.0 setuptools<82