From 54608e74fb33e0ac7cbd41e6577d1f967157c3d3 Mon Sep 17 00:00:00 2001 From: Tom Pollard Date: Thu, 24 Jan 2019 13:24:41 -0500 Subject: [PATCH 1/4] ignore .DS_Store --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a928a7c8..96a76af2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,7 @@ *.project *.pydevproject output/* -data/* \ No newline at end of file +data/* + +# OS X file +.DS_Store \ No newline at end of file From b0d7eac2af080890f28df2f1f2d9320d539a9a5c Mon Sep 17 00:00:00 2001 From: Tom Pollard Date: Thu, 24 Jan 2019 13:56:26 -0500 Subject: [PATCH 2/4] add requirements --- requirements.txt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..05f9a496 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +matplotlib==3.0.2 +networkx==2.2 +pycorenlp==0.3.0 +scikit-learn==0.20.2 +scipy==1.2.0 +spacy==2.0.18 +tensorflow==1.12.0 +# tensorflow-gpu==1.1.0 \ No newline at end of file From 047db3ff03244bf2f46c69684e94c0a240ead746 Mon Sep 17 00:00:00 2001 From: Tom Pollard Date: Thu, 24 Jan 2019 13:56:49 -0500 Subject: [PATCH 3/4] install from requirements --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ae7d1ae8..5eca898e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,11 @@ os: - linux language: python python: - - "3.5" + - "3.6" # command to install dependencies install: - bash .travis_install_ubuntu.sh - - pip install tensorflow - - pip install -U networkx matplotlib scikit-learn scipy spacy pycorenlp + - pip install -r requirements.txt - python -m spacy download en # ensure that NeuroNER doesn't perform too many epochs (Travis jobs are limited to 50 minutes) - sed -i 's/maximum_number_of_epochs = 100/maximum_number_of_epochs = 1/g' src/parameters.ini From ee0eae1f5721c98b7c952f9478326ee7fbc2f4de Mon Sep 17 00:00:00 2001 From: Tom Pollard Date: Thu, 24 Jan 2019 14:08:58 -0500 Subject: [PATCH 4/4] fix valueerror. closes #122 --- src/utils_plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils_plots.py b/src/utils_plots.py index 7aedbdd4..0b22e974 100644 --- a/src/utils_plots.py +++ b/src/utils_plots.py @@ -143,7 +143,7 @@ def plot_classification_report(classification_report, title='Classification repo else: lines = classification_report.split('\n') for line in lines[2 : (len(lines) - 1)]: - t = line.strip().replace('avg / total', 'micro-avg').split() + t = line.strip().replace(' avg', '-avg').split() if len(t) < 2: continue classes.append(t[0]) v = [float(x)*100 for x in t[1: len(t) - 1]]