根据multi-label-classification的demo,在predict时报错
Created by: xujingsophie
[2019-12-30 15:59:22,805] [ INFO] - The best model has been loaded [2019-12-30 15:59:22,806] [ INFO] - PaddleHub predict start ---------------------------------------------------------------------------EnforceNotMet Traceback (most recent call last) in 23 24 index = 0 ---> 25 run_states = cls_task.predict(data=data) 26 results = [run_state.run_results for run_state in run_states] 27 for result in results: /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/basic_task.py in predict(self, data, load_best_model) 633 self.predict_data = data 634 self.predict_start_event() --> 635 run_states = self.run() 636 self.predict_end_event(run_states) 637 self.predict_data = None /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/basic_task.py in run(self, do_eval) 641 with fluid.program_guard(self.main_program, self.startup_program): 642 if self.config.use_pyreader: --> 643 return self.run_with_py_reader(do_eval=do_eval) 644 return self.run_with_data_feeder(do_eval=do_eval) 645 /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/basic_task.py in run_with_py_reader(self, do_eval) 712 fetch_result = self.exe.run( 713 self.main_program_to_be_run, --> 714 fetch_list=self.fetch_list) 715 else: 716 fetch_result = self.exe.run( /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py in run(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache) 649 scope=scope, 650 return_numpy=return_numpy, --> 651 use_program_cache=use_program_cache) 652 else: 653 if fetch_list and program.is_data_parallel and program.program and ( /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py in run(self, program, exe, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache) 747 self.feed_data(program, feed, feed_var_name, scope) 748 if not use_program_cache: --> 749 exe.run(program.desc, scope, 0, True, True, fetch_var_name) 750 else: 751 exe.run_cached_prepared_ctx(ctx, scope, False, False, False) EnforceNotMet: Invoke operator read error. Python Callstacks: File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 1771, in append_op attrs=kwargs.get("attrs", None)) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op return self.main_program.current_block().append_op(*args, **kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/io.py", line 1138, in read_file type='read', inputs={'Reader': [reader]}, outputs={'Out': out}) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/basic_task.py", line 230, in build_env py_vars = fluid.layers.read_file(self.env.py_reader) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/basic_task.py", line 359, in main_program self.build_env() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/basic_task.py", line 641, in run with fluid.program_guard(self.main_program, self.startup_program): File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlehub/finetune/task/basic_task.py", line 635, in predict run_states = self.run() File "", line 10, in run_states = cls_task.predict(data=data) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3265, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3183, in run_ast_nodes if (yield from self.run_code(code, result)): File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3018, in run_cell_async interactivity=interactivity, compiler=compiler, result=result) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/IPython/core/async_helpers.py", line 67, in pseudo_sync_runner coro.send(None) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 2843, in run_cell return runner(coro) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 2817, in run_cell raw_cell, store_history, silent, shell_futures) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/ipykernel/zmqshell.py", line 536, in run_cell return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/ipykernel/ipkernel.py", line 294, in do_execute res = shell.run_cell(code, store_history=store_history, silent=silent) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/tornado/gen.py", line 326, in wrapper yielded = next(result) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/ipykernel/kernelbase.py", line 534, in execute_request user_expressions, allow_stdin, File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/tornado/gen.py", line 326, in wrapper yielded = next(result) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/ipykernel/kernelbase.py", line 267, in dispatch_shell yield gen.maybe_future(handler(stream, idents, msg)) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/tornado/gen.py", line 326, in wrapper yielded = next(result) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/ipykernel/kernelbase.py", line 357, in process_one yield gen.maybe_future(dispatch(*args)) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/tornado/gen.py", line 1147, in run yielded = self.gen.send(value) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/tornado/gen.py", line 1233, in inner self.run() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/tornado/stack_context.py", line 300, in null_wrapper return fn(args, *kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/tornado/ioloop.py", line 758, in _run_callback ret = callback() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/asyncio/events.py", line 88, in _run self._context.run(self._callback, self._args) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/asyncio/base_events.py", line 1771, in _run_once handle._run() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/asyncio/base_events.py", line 534, in run_forever self._run_once() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/tornado/platform/asyncio.py", line 132, in start self.asyncio_loop.run_forever() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/ipykernel/kernelapp.py", line 505, in start self.io_loop.start() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/traitlets/config/application.py", line 664, in launch_instance app.start() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/ipykernel_launcher.py", line 16, in app.launch_new_instance() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/runpy.py", line 193, in run_module_as_main "main", mod_spec) C++ Callstacks: reader should not be null at [/paddle/paddle/fluid/framework/reader.h:110] PaddlePaddle Call Stacks: 0 0x7f6b68623d58p void paddle::platform::EnforceNotMet::Initstd::string(std::string, char const, int) + 360 1 0x7f6b686240a7p paddle::platform::EnforceNotMet::EnforceNotMet(std::string const&, char const, int) + 87 2 0x7f6b694477c2p paddle::framework::ReaderHolder::ReadNext(std::vector<paddle::framework::LoDTensor, std::allocatorpaddle::framework::LoDTensor >) + 130 3 0x7f6b6944848cp paddle::operators::ReadOp::RunImpl(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void> const&) const + 540 4 0x7f6b6a5878dcp paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) + 332 5 0x7f6b687ae6fep paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool) + 606 6 0x7f6b687b16bfp paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector<std::string, std::allocatorstd::string > const&, bool) + 143 7 0x7f6b68614ebdp 8 0x7f6b68656166p 9 0x55e8e8067744p _PyMethodDef_RawFastCallKeywords + 596 10 0x55e8e8067861p _PyCFunction_FastCallKeywords + 33 11 0x55e8e80d36e8p _PyEval_EvalFrameDefault + 21240 12 0x55e8e8017539p _PyEval_EvalCodeWithName + 761 13 0x55e8e8066f57p _PyFunction_FastCallKeywords + 903 14 0x55e8e80cf8ccp _PyEval_EvalFrameDefault + 5340 15 0x55e8e8017539p _PyEval_EvalCodeWithName + 761 16 0x55e8e8066f57p _PyFunction_FastCallKeywords + 903 17 0x55e8e80cf8ccp _PyEval_EvalFrameDefault + 5340 18 0x55e8e8017539p _PyEval_EvalCodeWithName + 761 19 0x55e8e8066f57p _PyFunction_FastCallKeywords + 903 20 0x55e8e80cf8ccp _PyEval_EvalFrameDefault + 5340 21 0x55e8e8017539p _PyEval_EvalCodeWithName + 761 22 0x55e8e8066ef5p _PyFunction_FastCallKeywords + 805 23 0x55e8e80cea93p _PyEval_EvalFrameDefault + 1699 24 0x55e8e8017539p _PyEval_EvalCodeWithName + 761 25 0x55e8e8066f57p _PyFunction_FastCallKeywords + 903 26 0x55e8e80cf8ccp _PyEval_EvalFrameDefault + 5340 27 0x55e8e8017539p _PyEval_EvalCodeWithName + 761 28 0x55e8e8018424p PyEval_EvalCodeEx + 68 29 0x55e8e801844cp PyEval_EvalCode + 28 30 0x55e8e80ddf8dp 31 0x55e8e80675d9p _PyMethodDef_RawFastCallKeywords + 233 32 0x55e8e8067861p _PyCFunction_FastCallKeywords + 33 33 0x55e8e80d2b94p _PyEval_EvalFrameDefault + 18340 34 0x55e8e8070592p _PyGen_Send + 674 35 0x55e8e80cfe69p _PyEval_EvalFrameDefault + 6777 36 0x55e8e8070592p _PyGen_Send + 674 37 0x55e8e80cfe69p _PyEval_EvalFrameDefault + 6777 38 0x55e8e8070592p _PyGen_Send + 674 39 0x55e8e806757dp _PyMethodDef_RawFastCallKeywords + 141 40 0x55e8e806f3cfp _PyMethodDescr_FastCallKeywords + 79 41 0x55e8e80d307cp _PyEval_EvalFrameDefault + 19596 42 0x55e8e8066ccbp _PyFunction_FastCallKeywords + 251 43 0x55e8e80ce806p _PyEval_EvalFrameDefault + 1046 44 0x55e8e8066ccbp _PyFunction_FastCallKeywords + 251 45 0x55e8e80cea93p _PyEval_EvalFrameDefault + 1699 46 0x55e8e8017539p _PyEval_EvalCodeWithName + 761 47 0x55e8e8018860p _PyFunction_FastCallDict + 1024 48 0x55e8e8036e53p _PyObject_Call_Prepend + 99 49 0x55e8e8029dbep PyObject_Call + 110 50 0x55e8e80d0232p _PyEval_EvalFrameDefault + 7746 51 0x55e8e801781ap _PyEval_EvalCodeWithName + 1498 52 0x55e8e8066f57p _PyFunction_FastCallKeywords + 903 53 0x55e8e80cf8ccp _PyEval_EvalFrameDefault + 5340 54 0x55e8e8070059p 55 0x55e8e80675d9p _PyMethodDef_RawFastCallKeywords + 233 56 0x55e8e8067861p _PyCFunction_FastCallKeywords + 33 57 0x55e8e80d2b94p _PyEval_EvalFrameDefault + 18340 58 0x55e8e8017d09p _PyEval_EvalCodeWithName + 2761 59 0x55e8e8066f57p _PyFunction_FastCallKeywords + 903 60 0x55e8e80cea93p _PyEval_EvalFrameDefault + 1699 61 0x55e8e8070059p 62 0x55e8e80675d9p _PyMethodDef_RawFastCallKeywords + 233 63 0x55e8e8067861p _PyCFunction_FastCallKeywords + 33 64 0x55e8e80d2b94p _PyEval_EvalFrameDefault + 18340 65 0x55e8e8017d09p _PyEval_EvalCodeWithName + 2761 66 0x55e8e8066f57p _PyFunction_FastCallKeywords + 903 67 0x55e8e80ce806p _PyEval_EvalFrameDefault + 1046 68 0x55e8e8070059p 69 0x55e8e80675d9p _PyMethodDef_RawFastCallKeywords + 233 70 0x55e8e8067861p _PyCFunction_FastCallKeywords + 33 71 0x55e8e80d2b94p _PyEval_EvalFrameDefault + 18340 72 0x55e8e8017d09p _PyEval_EvalCodeWithName + 2761 73 0x55e8e8018635p _PyFunction_FastCallDict + 469 74 0x55e8e8036e53p _PyObject_Call_Prepend + 99 75 0x55e8e8029dbep PyObject_Call + 110 76 0x55e8e80d0232p _PyEval_EvalFrameDefault + 7746 77 0x55e8e807043cp _PyGen_Send + 332 78 0x55e8e806757dp _PyMethodDef_RawFastCallKeywords + 141 79 0x55e8e806f3cfp _PyMethodDescr_FastCallKeywords + 79 80 0x55e8e80d307cp _PyEval_EvalFrameDefault + 19596 81 0x55e8e8066ccbp _PyFunction_FastCallKeywords + 251 82 0x55e8e80cea93p _PyEval_EvalFrameDefault + 1699 83 0x55e8e801781ap _PyEval_EvalCodeWithName + 1498 84 0x55e8e8018635p _PyFunction_FastCallDict + 469 85 0x55e8e80d0232p _PyEval_EvalFrameDefault + 7746 86 0x55e8e8017d09p _PyEval_EvalCodeWithName + 2761 87 0x55e8e8018635p _PyFunction_FastCallDict + 469 88 0x55e8e8126b5bp 89 0x55e8e806f8fbp _PyObject_FastCallKeywords + 1179 90 0x55e8e80d2e86p _PyEval_EvalFrameDefault + 19094 91 0x55e8e801856bp _PyFunction_FastCallDict + 267 92 0x55e8e8036e53p _PyObject_Call_Prepend + 99 93 0x55e8e806f8fbp _PyObject_FastCallKeywords + 1179 94 0x55e8e8102383p 95 0x55e8e8038584p _PyMethodDef_RawFastCallDict + 404 96 0x55e8e80387c1p _PyCFunction_FastCallDict + 33 97 0x55e8e80d4007p _PyEval_EvalFrameDefault + 23575 98 0x55e8e8066ccbp _PyFunction_FastCallKeywords + 251 99 0x55e8e80cea93p _PyEval_EvalFrameDefault + 1699