Skip to content

Commit 4cbfc3a

Browse files
Merge pull request #130 from Franck-Dernoncourt/requirements
Add requirements, fix tests
2 parents 96b525e + ee0eae1 commit 4cbfc3a

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@
55
*.project
66
*.pydevproject
77
output/*
8-
data/*
8+
data/*
9+
10+
# OS X file
11+
.DS_Store

.travis.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ os:
44
- linux
55
language: python
66
python:
7-
- "3.5"
7+
- "3.6"
88
# command to install dependencies
99
install:
1010
- bash .travis_install_ubuntu.sh
11-
- pip install tensorflow
12-
- pip install -U networkx matplotlib scikit-learn scipy spacy pycorenlp
11+
- pip install -r requirements.txt
1312
- python -m spacy download en
1413
# ensure that NeuroNER doesn't perform too many epochs (Travis jobs are limited to 50 minutes)
1514
- sed -i 's/maximum_number_of_epochs = 100/maximum_number_of_epochs = 1/g' src/parameters.ini

requirements.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
matplotlib==3.0.2
2+
networkx==2.2
3+
pycorenlp==0.3.0
4+
scikit-learn==0.20.2
5+
scipy==1.2.0
6+
spacy==2.0.18
7+
tensorflow==1.12.0
8+
# tensorflow-gpu==1.1.0

src/utils_plots.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def plot_classification_report(classification_report, title='Classification repo
143143
else:
144144
lines = classification_report.split('\n')
145145
for line in lines[2 : (len(lines) - 1)]:
146-
t = line.strip().replace('avg / total', 'micro-avg').split()
146+
t = line.strip().replace(' avg', '-avg').split()
147147
if len(t) < 2: continue
148148
classes.append(t[0])
149149
v = [float(x)*100 for x in t[1: len(t) - 1]]

0 commit comments

Comments
 (0)