Error: Paddle internal Check failed.
Created by: Akeepers
我按照ERNIE 序列标注的例子跑代码,有两处改动
- 把数据集替换为同格式自定义数据集
- 修改了reader 函数
但是程序运行时保错,从错误信息无法看出原因,以下是输出:
/home/yangpan/anaconda3/envs/paddle-py2.7/lib/python2.7/site-packages/paddle/fluid/executor.py:779: UserWarning: The following exception is not an EOF exception.
"The following exception is not an EOF exception.")
Traceback (most recent call last):
File "run_sequence_labeling.py", line 358, in <module>
main(args)
File "run_sequence_labeling.py", line 242, in main
train_exe.run(fetch_list=[])
File "/home/yangpan/anaconda3/envs/paddle-py2.7/lib/python2.7/site-packages/paddle/fluid/parallel_executor.py", line 311, in run
return_numpy=return_numpy)
File "/home/yangpan/anaconda3/envs/paddle-py2.7/lib/python2.7/site-packages/paddle/fluid/executor.py", line 780, in run
six.reraise(*sys.exc_info())
File "/home/yangpan/anaconda3/envs/paddle-py2.7/lib/python2.7/site-packages/paddle/fluid/executor.py", line 775, in run
use_program_cache=use_program_cache)
File "/home/yangpan/anaconda3/envs/paddle-py2.7/lib/python2.7/site-packages/paddle/fluid/executor.py", line 834, in _run_impl
return_numpy=return_numpy)
File "/home/yangpan/anaconda3/envs/paddle-py2.7/lib/python2.7/site-packages/paddle/fluid/executor.py", line 674, in _run_parallel
tensors = exe.run(fetch_var_names)._move_to_list()
paddle.fluid.core_avx.EnforceNotMet:
--------------------------------------------
C++ Call Stacks (More useful to developers):
--------------------------------------------
0 std::string paddle::platform::GetTraceBackString<std::string const&>(std::string const&, char const*, int)
1 paddle::platform::EnforceNotMet::EnforceNotMet(std::string const&, char const*, int) [0/1352]
2 paddle::operators::ChunkEvalKernel<paddle::platform::CPUPlace, float>::GetSegments(long const*, int, std::vector<paddle::operators::ChunkEvalKernel<paddle::platform::CPUPlace, float>::Segment, std::allocator<paddle::operators::ChunkEvalKernel<paddle::platform::CPUPlace, float>::Segment> >*, int, int, int, int, int, int, int) const
3 paddle::operators::ChunkEvalKernel<paddle::platform::CPUPlace, float>::EvalOneSeq(long const*, long const*, int, std::vector<paddle::operators::ChunkEvalKernel<paddle::platform::CPUPlace, float>::Segment, std::allocator<paddle::operators::ChunkEvalKernel<paddle::platform::CPUPlace, float>::Segment> >*, std::vector<paddle::operators::ChunkEvalKernel<paddle::platform::CPUPlace, $loat>::Segment, std::allocator<paddle::operators::ChunkEvalKernel<paddle::platform::CPUPlace, float>::Segment> >*, long*, long*, long*, int, int, int, int, int, int, int, std::set<int, std::l$ss<int>, std::allocator<int> > const&) const
4 paddle::operators::ChunkEvalKernel<paddle::platform::CPUPlace, float>::Compute(paddle::framework::ExecutionContext const&) const
5 std::_Function_handler<void (paddle::framework::ExecutionContext const&), paddle::framework::OpKernelRegistrarFunctor<paddle::platform::CPUPlace, false, 0ul, paddle::operators::ChunkEvalK$rnel<paddle::platform::CPUPlace, float> >::operator()(char const*, char const*, int) const::{lambda(paddle::framework::ExecutionContext const&)#1}>::_M_invoke(std::_Any_data const&, paddle::f$amework::ExecutionContext const&)
6 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&, paddle::framework::RuntimeContext*) const
7 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&) const
8 paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, paddle::platform::Place const&)
9 paddle::framework::details::ComputationOpHandle::RunImpl()
10 paddle::framework::details::FastThreadedSSAGraphExecutor::RunOpSync(paddle::framework::details::OpHandleBase*)
11 paddle::framework::details::FastThreadedSSAGraphExecutor::RunOp(paddle::framework::details::OpHandleBase*, std::shared_ptr<paddle::framework::BlockingQueue<unsigned long> > const&, unsign$d long*)
12 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_bas$::_Result<void>, std::__future_base::_Result_base::_Deleter>, void> >::_M_invoke(std::_Any_data const&)
13 std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&)
14 ThreadPool::ThreadPool(unsigned long)::{lambda()#1}::operator()() const
------------------------------------------
Python Call Stacks (More useful to users):
------------------------------------------
File "/home/yangpan/anaconda3/envs/paddle-py2.7/lib/python2.7/site-packages/paddle/fluid/framework.py", line 2488, in append_op
attrs=kwargs.get("attrs", None))
File "/home/yangpan/anaconda3/envs/paddle-py2.7/lib/python2.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)
File "/home/yangpan/anaconda3/envs/paddle-py2.7/lib/python2.7/site-packages/paddle/fluid/layers/nn.py", line 2195, in chunk_eval
"excluded_chunk_types": excluded_chunk_types or []
File "/home/yangpan/projects/paper_recurrence/PLMEE/ERNIE/ernie/finetune/sequence_label.py", line 83, in create_model
num_chunk_types=((args.num_labels-1)//(len(args.chunk_scheme)-1)))
File "run_sequence_labeling.py", line 111, in main
ernie_config=ernie_config)
File "run_sequence_labeling.py", line 358, in <module>
main(args)
----------------------
Error Message Summary:
----------------------
Error: Paddle internal Check failed. (Please help us create a new issue, here we need to find the developer to add a user friendly error message)
[Hint: Expected label[i] <= num_chunk_types * num_tag_types, but received label[i]:34 > num_chunk_types * num_tag_types:6.] at (/paddle/paddle/fluid/operators/chunk_eval_op.h:54)
[operator < chunk_eval > error]