stanfordmlgroup / chexpert-labeler

CheXpert NLP tool to extract observations from radiology reports.
MIT License
340 stars 79 forks source link

Unable to run Labeler - invalid package #35

Open sm-santomartino opened 2 years ago

sm-santomartino commented 2 years ago

Hello, I am trying to run the chexpert labeler on some reports. I'm first working out how to even get it going, so I'm using the sample_reports.csv file. Upon running label.py, the program quickly fails with the following error:

File "/Users/xxx/opt/miniconda3/envs/chexpert-label/lib/python3.6/site-packages/StanfordDependencies/JPypeBackend.py", line 44, in init self.corenlp = jpype.JPackage('edu').stanford.nlp AttributeError: Java package 'edu' is not valid

I've tried importing the edu.stanford.nlp package at the top of the file, using jpype.JClass(...), and a couple other things but this inevitably breaks something else further down the line. Any guidance or suggestions in resolving this problem and getting the labeler up and running is much appreciated!

jirvin16 commented 2 years ago

Hello, I am trying to run the chexpert labeler on some reports. I'm first working out how to even get it going, so I'm using the sample_reports.csv file. Upon running label.py, the program quickly fails with the following error:

File "/Users/xxx/opt/miniconda3/envs/chexpert-label/lib/python3.6/site-packages/StanfordDependencies/JPypeBackend.py", line 44, in init self.corenlp = jpype.JPackage('edu').stanford.nlp AttributeError: Java package 'edu' is not valid

I've tried importing the edu.stanford.nlp package at the top of the file, using jpype.JClass(...), and a couple other things but this inevitably breaks something else further down the line. Any guidance or suggestions in resolving this problem and getting the labeler up and running is much appreciated!

I haven't seen this error before. I would guess it's an issue with package versions - may be worth trying a dockerized runtime instead, see this PR for more details: https://github.com/stanfordmlgroup/chexpert-labeler/pull/32