Closed Blair-Young closed 5 years ago
Even I am facing the same issue!
It seems something has changed in distutils. Try changing
import distutils
to import distutils.util
in neuroner.py,
@abhishek-jain11 thanks. works for me: import distutils to import distutils.util in neuroner.py,
Thanks for the advice, the problem I am getting now is the when testing the pretrained model using
python3.5 main.py --train_model=False --use_pretrained_model=True --dataset_text_folder=../data/example_unannotated_texts/ --pretrained_model_folder=../trained_models/conll_2003_en
I get this back.
Training completed in 0.00 seconds
Predict labels for the deploy set
Formatting 000_deploy set from CONLL to BRAT... Done.
Finishing the experiment
I cannot seem to find the output of the test. I notice that it seems like its training a new model for 0 epochs. Is this 0 epoch model being used for testing?
You should move the file parameters.ini to your root folder path and set your settings in this file, and then the command python3 main.py will work !
And you should run 'python3 main.py' in terminal
@ Blair-Young
Even I am getting the same error that you got.
Training completed in 0.00 seconds Predict labels for the deploy set Formatting 000_deploy set from CONLL to BRAT... Done. Finishing the experiment
were you solve it?
I am having same issue changing import distutils
to import distutils.util
or from distutils.util
not working for me . Giving same error.
@Blair-Young @eswar3 @iamabhaykmr
follow this path in your NeuroNER folder to find the output of random unannotated_texts -
NeuroNER-master/output/example_unannotated_texts_2018-09-07_08-56-29-358320/brat/deploy
you will be able to see the output.
The following error should be fixed in https://github.com/Franck-Dernoncourt/NeuroNER/pull/78
Traceback (most recent call last):
File "main.py", line 250, in <module>
main()
File "main.py", line 245, in main
nn = NeuroNER(**arguments)
File "/Users/tompollard/projects/NeuroNER/src/neuroner.py", line 257, in __init__
parameters, conf_parameters = self._load_parameters(arguments['parameters_filepath'], arguments=arguments)
File "/Users/tompollard/projects/NeuroNER/src/neuroner.py", line 118, in _load_parameters
parameters[k] = distutils.util.strtobool(v)
AttributeError: module 'distutils' has no attribute 'util'
Exception ignored in: <bound method NeuroNER.__del__ of <neuroner.NeuroNER object at 0x10601dc18>>
Traceback (most recent call last):
File "/Users/tompollard/projects/NeuroNER/src/neuroner.py", line 489, in __del__
self.sess.close()
AttributeError: 'NeuroNER' object has no attribute 'sess'
I have tried all the above solutions and still get the error
Checking validity of CONLL BIOES format... Done.
Traceback (most recent call last):
File "/home/asmita/anaconda3/bin/neuroner", line 10, in <module>
sys.exit(main())
File "/home/asmita/anaconda3/lib/python3.7/site-packages/neuroner/__main__.py", line 109, in main
nn = neuromodel.NeuroNER(**arguments)
File "/home/asmita/anaconda3/lib/python3.7/site-packages/neuroner/neuromodel.py", line 458, in __init__
self._check_param_compatibility(self.parameters, self.dataset_filepaths)
File "/home/asmita/anaconda3/lib/python3.7/site-packages/neuroner/neuromodel.py", line 587, in _check_param_compatibility
check_param_compatibility(parameters, dataset_filepaths)
File "/home/asmita/anaconda3/lib/python3.7/site-packages/neuroner/neuromodel.py", line 393, in check_param_compatibility
if parameters['output_scores'] and parameters['use_crf']:
KeyError: 'output_scores'
Exception ignored in: <function NeuroNER.__del__ at 0x7fde52c71c80>
Traceback (most recent call last):
File "/home/asmita/anaconda3/lib/python3.7/site-packages/neuroner/neuromodel.py", line 820, in __del__
self.sess.close()
AttributeError: 'NeuroNER' object has no attribute 'sess'
I have tried all the above solutions and still get the error
Checking validity of CONLL BIOES format... Done. Traceback (most recent call last): File "/home/asmita/anaconda3/bin/neuroner", line 10, in <module> sys.exit(main()) File "/home/asmita/anaconda3/lib/python3.7/site-packages/neuroner/__main__.py", line 109, in main nn = neuromodel.NeuroNER(**arguments) File "/home/asmita/anaconda3/lib/python3.7/site-packages/neuroner/neuromodel.py", line 458, in __init__ self._check_param_compatibility(self.parameters, self.dataset_filepaths) File "/home/asmita/anaconda3/lib/python3.7/site-packages/neuroner/neuromodel.py", line 587, in _check_param_compatibility check_param_compatibility(parameters, dataset_filepaths) File "/home/asmita/anaconda3/lib/python3.7/site-packages/neuroner/neuromodel.py", line 393, in check_param_compatibility if parameters['output_scores'] and parameters['use_crf']: KeyError: 'output_scores' Exception ignored in: <function NeuroNER.__del__ at 0x7fde52c71c80> Traceback (most recent call last): File "/home/asmita/anaconda3/lib/python3.7/site-packages/neuroner/neuromodel.py", line 820, in __del__ self.sess.close() AttributeError: 'NeuroNER' object has no attribute 'sess'
I have the same error,have you solved it?
Please could you try the solution discussed in: https://github.com/Franck-Dernoncourt/NeuroNER/issues/87?
adding the following line to your parameters.ini file may fix the issue for now:
output_scores = False
I'll add a fix to the code shortly to prevent the error being raised in cases where the argument is missing.
Please could you try the solution discussed in: #87?
adding the following line to your parameters.ini file may fix the issue for now:
output_scores = False
I'll add a fix to the code shortly to prevent the error being raised in cases where the argument is missing.
Yes,I did.And The output_scores = False
is already in my parameters.ini file.
Please could you try the solution discussed in: #87?
adding the following line to your parameters.ini file may fix the issue for now:
output_scores = False
I'll add a fix to the code shortly to prevent the error being raised in cases where the argument is missing.
Yes,I did.And The
output_scores = False
is already in my parameters.ini file.
The output_scores = False
is also already in my parameters.ini file. Yet, I still get the error.
I removed the python3-distutils and occur this problem.
Hey, thanks for the code. Unfortunately I am having difficulty running the pretrained conll_2003_en model. mu parameters.ini file looks like this:
However when I run the
python3.5 main.py
orpython3.5 main.py --train_model=False --use_pretrained_model=True --dataset_text_folder=../data/example_unannotated_texts --pretrained_model_folder=../trained_models/conll_2003_en
I get this: