ImportError: cannot import name 'run_evaluation' from 'rasa_nlu.evaluate'
TQuy opened this issue · 0 comments
I was trying to quickly test on my local machine without docker or mongodb by running: python -m nlu_hyperopt.app
then there is an error
INFO:main:Starting up
Running experiment : default
Max evaluations: 100
Search space: {'epochs': <hyperopt.pyll.base.Apply object at 0x00000265928B2B38>, 'max_df': <hyperopt.pyll.base.Apply object at 0x00000265928CF780>, 'min_ngrams': <hyperopt.pyll.base.Apply object at 0x00000265928CF908>}
INFO:hyperopt.tpe:tpe_transform took 0.000998 seconds
INFO:hyperopt.tpe:TPE using 0 trials
INFO:hyperopt.fmin:job exception: cannot import name 'run_evaluation' from 'rasa_nlu.evaluate' (C:\Anaconda3\lib\site-packages\rasa_nlu\evaluate.py)
Traceback (most recent call last):
File "C:\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\quynt\git\nlu-hyperopt\nlu_hyperopt\app.py", line 49, in
max_evals=max_evals)
File "C:\Anaconda3\lib\site-packages\hyperopt\fmin.py", line 385, in fmin
rval.exhaust()
File "C:\Anaconda3\lib\site-packages\hyperopt\fmin.py", line 244, in exhaust
self.run(self.max_evals - n_done, block_until_done=self.asynchronous)
File "C:\Anaconda3\lib\site-packages\hyperopt\fmin.py", line 218, in run
self.serial_evaluate()
File "C:\Anaconda3\lib\site-packages\hyperopt\fmin.py", line 137, in serial_evaluate
result = self.domain.evaluate(spec, ctrl)
File "C:\Anaconda3\lib\site-packages\hyperopt\base.py", line 840, in evaluate
rval = self.fn(pyll_rval)
File "C:\Users\quynt\git\nlu-hyperopt\nlu_hyperopt\app.py", line 18, in worker_function
from nlu_hyperopt.optimization import run_trial
File "C:\Users\quynt\git\nlu-hyperopt\nlu_hyperopt\optimization.py", line 5, in
from rasa_nlu.evaluate import run_evaluation
ImportError: cannot import name 'run_evaluation' from 'rasa_nlu.evaluate' (C:\Anaconda3\lib\site-packages\rasa_nlu\evaluate.py)
how did u solve this?