修改代码,打印的错误信息无法定位错误代码位置
如题:修改了ernie的代码,调试过程中发现错误,但是错误信息无法定位到错误代码位置
share_vars_from is set, scope is ignored.
I0910 11:16:58.119014 6704 parallel_executor.cc:329] The number of CUDAPlace, which is used in ParallelExecutor, is 1. And the Program will be copied 1 copies
I0910 11:16:58.132833 6704 build_strategy.cc:340] SeqOnlyAllReduceOps:0, num_trainers:1
example.label 1
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/work/anaconda2/envs/paddle_gpu/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/work/anaconda2/envs/paddle_gpu/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/work/anaconda2/envs/paddle_gpu/lib/python2.7/site-packages/paddle/fluid/layers/io.py", line 593, in __provider_thread__
raise ex
KeyError: u'1'
求问,如何设置才能正确打印错误信息的代码位置
如题:修改了ernie的代码,调试过程中发现错误,但是错误信息无法定位到错误代码位置 share_vars_from is set, scope is ignored. I0910 11:16:58.119014 6704 parallel_executor.cc:329] The number of CUDAPlace, which is used in ParallelExecutor, is 1. And the Program will be copied 1 copies I0910 11:16:58.132833 6704 build_strategy.cc:340] SeqOnlyAllReduceOps:0, num_trainers:1 example.label 1 Exception in thread Thread-1: Traceback (most recent call last): File "/home/work/anaconda2/envs/paddle_gpu/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/home/work/anaconda2/envs/paddle_gpu/lib/python2.7/threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "/home/work/anaconda2/envs/paddle_gpu/lib/python2.7/site-packages/paddle/fluid/layers/io.py", line 593, in provider_thread raise ex KeyError: u'1'
求问,如何设置才能正确打印错误信息的代码位置
看报错信息好像是输入数据格式不对,请 check 下输入数据格式表头是否和提供的示例数据一致.
我的问题是如何设置能够打印错误代码的位置,我通过把代码各个位置加入调试信息终于知道是哪里错了,但是这种打印错误的方式,对于调试很难受,本来我只需要1分钟就改了错误,但是这种打印结果的方式我用了2个小时来查找错误,效率及其低啊
对该痛点深有体会,时不时遇到报错信息无法定位问题 ,然后花费大力气来查找定位错误原因
PaddlePaddle 框架会逐步提升报错信息的可读性,不断提升 Debug 效率,请关注;
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reopen it. Thank you for your contributions.