From abe669e96e07a99bd62d6cd44c3b337670e79f0e Mon Sep 17 00:00:00 2001 From: andreassot10 Date: Tue, 28 Sep 2021 12:53:49 +0100 Subject: [PATCH 1/3] code: Add two '_' before 'loss'. --- build/lib/pxtextmining/factories/factory_model_performance.py | 2 +- pxtextmining/factories/factory_model_performance.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/lib/pxtextmining/factories/factory_model_performance.py b/build/lib/pxtextmining/factories/factory_model_performance.py index da319521..c5413c44 100644 --- a/build/lib/pxtextmining/factories/factory_model_performance.py +++ b/build/lib/pxtextmining/factories/factory_model_performance.py @@ -93,7 +93,7 @@ def factory_model_performance(pipe, x_train, y_train, x_test, y_test, # Note that SGDClassifier fits a logistic regression when loss is "log", but a Linear SVM when loss is "hinge". # Looking at column "learner" in "tuning results", one cannot tell which of the two models SGD is. # Let's make that clear. - if 'param_clf__estimator_loss' in tuning_results.columns: # Need statement as models other than SGD don't have loss. + if 'param_clf__estimator__loss' in tuning_results.columns: # Need statement as models other than SGD don't have loss. learners = [] for i, j in zip(tuning_results["learner"], tuning_results["param_clf__estimator__loss"]): if j == "log": diff --git a/pxtextmining/factories/factory_model_performance.py b/pxtextmining/factories/factory_model_performance.py index da319521..c5413c44 100644 --- a/pxtextmining/factories/factory_model_performance.py +++ b/pxtextmining/factories/factory_model_performance.py @@ -93,7 +93,7 @@ def factory_model_performance(pipe, x_train, y_train, x_test, y_test, # Note that SGDClassifier fits a logistic regression when loss is "log", but a Linear SVM when loss is "hinge". # Looking at column "learner" in "tuning results", one cannot tell which of the two models SGD is. # Let's make that clear. - if 'param_clf__estimator_loss' in tuning_results.columns: # Need statement as models other than SGD don't have loss. + if 'param_clf__estimator__loss' in tuning_results.columns: # Need statement as models other than SGD don't have loss. learners = [] for i, j in zip(tuning_results["learner"], tuning_results["param_clf__estimator__loss"]): if j == "log": From 5a37cd4e465ce14880ab25905d2001be57e4276f Mon Sep 17 00:00:00 2001 From: andreassot10 Date: Tue, 28 Sep 2021 12:59:35 +0100 Subject: [PATCH 2/3] Update pillow to address vulnerability issue. --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index b9b48513..78267ad3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,7 +19,7 @@ nltk==3.5 numpy==1.20.2 pandas==1.2.3 pickleshare==0.7.5 -Pillow==8.2.0 +Pillow>=8.3.2 plac==1.1.3 preshed==3.0.5 protobuf==3.17.2 diff --git a/setup.py b/setup.py index bfdfd745..28c4072c 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ "numpy>=1.20.2", "pandas==1.2.3", "pickleshare==0.7.5", - "Pillow==8.2.0", + "Pillow>=8.3.2", "plac==1.1.3", "preshed==3.0.5", "protobuf==3.17.2", From e67433233075b0d09e761bc344fa7fe9769ac9ef Mon Sep 17 00:00:00 2001 From: andreassot10 Date: Tue, 28 Sep 2021 13:02:22 +0100 Subject: [PATCH 3/3] Bumped version number to 0.3.4. --- README.md | 8 ++++---- docs/source/conf.py | 2 +- setup.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 444ca62f..18ac0fa5 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ environment `text_venv`: ### Install from PyPI 1. Install `pxtextmining` and its PyPI dependencies: - - `pip3 install pxtextmining==0.3.2` (Linux & MacOS); - - `pip install pxtextmining==0.3.2` (Windows); + - `pip3 install pxtextmining==0.3.4` (Linux & MacOS); + - `pip install pxtextmining==0.3.4` (Windows); 1. We also need to install a couple of [`spaCy`](https://github.com/explosion/spacy-models) models. @@ -65,7 +65,7 @@ All steps in one go: ``` python3 -m venv text_venv source text_venv/bin/activate - pip3 install pxtextmining==0.3.2 + pip3 install pxtextmining==0.3.4 pip3 install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.1/en_core_web_sm-2.3.1.tar.gz pip3 install https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-2.3.1/en_core_web_lg-2.3.1.tar.gz ``` @@ -73,7 +73,7 @@ All steps in one go: ``` python -m venv text_venv text_venv\Scripts\activate - pip install pxtextmining==0.3.2 + pip install pxtextmining==0.3.4 pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.1/en_core_web_sm-2.3.1.tar.gz pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-2.3.1/en_core_web_lg-2.3.1.tar.gz ``` diff --git a/docs/source/conf.py b/docs/source/conf.py index 5711525c..c90a2e54 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,7 @@ author = 'Andreas D Soteriades' # The full version, including alpha/beta/rc tags -release = '0.3.2' +release = '0.3.4' # -- General configuration --------------------------------------------------- diff --git a/setup.py b/setup.py index 28c4072c..db486458 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name="pxtextmining", - version="0.3.2", + version="0.3.4", author="Andreas D Soteriades", author_email="andreas.soteriades@nottshc.nhs.uk", description="Text Classification of Patient Experience feedback",