is_sparse=True下,如果特征不加mod会抛异常
Created by: codescv
ctr模型中,如果把reader.py改成这样:(特征不加mod)
for idx in self.categorical_range_:
#sparse_feature.append([hash("%d_%s" % (idx, features[idx])) % self.hash_dim_])
sparse_feature.append([hash("%d_%s" % (idx, features[idx]))])
仍然会报错,错误信息:
2018-11-14 03:19:39,738 - INFO - run dist training
2018-11-14 03:19:39,778 - INFO - run pserver
get_pserver_program() is deprecated, call get_pserver_programs() to get pserver main and startup in a single call.2018-11-14 03:19:39,796 - WARNING - distribute lookup table only support sgd optimizer, change it's optimizer to sgd instead of sgd
get_startup_program() is deprecated, call get_pserver_programs() to get pserver main and startup in a single call.passing pserver_program to get_startup_program() is deprecated, you can use new API get_pserver_programs() to get both pserver main program and startup program.F1114 03:19:54.470163 96 listen_and_serv_op.cc:73] run sub program:9 error Input rows index should less than height at [/Paddle/Paddle/paddle/fluid/operators/sgd_op.h:113]
PaddlePaddle Call Stacks:
0 0x7fd627b387b7p paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int) + 727
1 0x7fd628697e8dp paddle::operators::SGDOpKernel<float>::Compute(paddle::framework::ExecutionContext const&) const + 8493
2 0x7fd62869829fp std::_Function_handler<void (paddle::framework::ExecutionContext const&), paddle::framework::OpKernelRegistrarFunctor<paddle::platform::CPUPlace, false, 0ul, paddle::operators::SGDOpKernel<float>, paddle::operators::SGDOpKernel<double> >::operator()(char const*, char const*) const::{lambda(paddle::framework::ExecutionContext const&)#1}>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&) + 47
3 0x7fd6289ba5a2p paddle::framework::OperatorWithKernel::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 + 658
4 0x7fd6289b446dp 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&) + 269
5 0x7fd627c1d66ep paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool) + 270
6 0x7fd6286e0972p
7 0x7fd627cdeceep std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) + 46
8 0x7fd65c500a99p
9 0x7fd6286df677p
10 0x7fd6289d5577p paddle::framework::ThreadPool::TaskLoop() + 1911
11 0x7fd5cb0d2c80p
12 0x7fd65c4f96bap
13 0x7fd65c22f41dp clone + 109
*** Check failure stack trace: ***
@ 0x7fd627bd3a8d google::LogMessage::Fail()
@ 0x7fd627bd5dd8 google::LogMessage::SendToLog()
@ 0x7fd627bd359b google::LogMessage::Flush()
@ 0x7fd627bd6cae google::LogMessageFatal::~LogMessageFatal()
@ 0x7fd6286e0a53 _ZNSt17_Function_handlerIFSt10unique_ptrINSt13__future_base12_Result_baseENS2_8_DeleterEEvENS1_12_Task_setterIS0_INS1_7_ResultIS0_IN6paddle8platform13EnforceNotMetESt14default_deleteISA_EEEES3_ESt12_Bind_simpleIFSt17reference_wrapperIZNS8_9framework10ThreadPool18RunAndGetExceptionIZNS8_9operatorsL21ParallelExecuteBlocksERKSt6vectorImSaImEEPNSI_8ExecutorERKSM_ISt10shared_ptrINSI_22ExecutorPrepareContextEESaISV_EEPNSI_11ProgramDescEPNSI_5ScopeEEUlvE_EESt6futureISD_ET_EUlvE_EvEESD_EEE9_M_invokeERKSt9_Any_data
@ 0x7fd627cdecee std::__future_base::_State_baseV2::_M_do_set()
@ 0x7fd65c500a99 __pthread_once_slow
@ 0x7fd6286df677 _ZNSt13__future_base11_Task_stateIZN6paddle9framework10ThreadPool18RunAndGetExceptionIZNS1_9operatorsL21ParallelExecuteBlocksERKSt6vectorImSaImEEPNS2_8ExecutorERKS6_ISt10shared_ptrINS2_22ExecutorPrepareContextEESaISF_EEPNS2_11ProgramDescEPNS2_5ScopeEEUlvE_EESt6futureISt10unique_ptrINS1_8platform13EnforceNotMetESt14default_deleteISS_EEET_EUlvE_SaIiEFSV_vEE6_M_runEv
@ 0x7fd6289d5577 paddle::framework::ThreadPool::TaskLoop()
@ 0x7fd5cb0d2c80 (unknown)
@ 0x7fd65c4f96ba start_thread
@ 0x7fd65c22f41d clone
@ (nil) (unknown)
*** Aborted at 1542165594 (unix time) try "date -d @1542165594" if you are using GNU date ***
PC: @ 0x0 (unknown)
*** SIGSEGV (@0x0) received by PID 1 (TID 0x7fd35bfff700) from PID 0; stack trace: ***
@ 0x7fd65c503390 (unknown)
@ 0x7fd65c15f196 abort
@ 0x7fd627bdee07 google::DumpStackTraceAndExit()
@ 0x7fd627bd3a8d google::LogMessage::Fail()
@ 0x7fd627bd5dd8 google::LogMessage::SendToLog()
@ 0x7fd627bd359b google::LogMessage::Flush()
@ 0x7fd627bd6cae google::LogMessageFatal::~LogMessageFatal()
@ 0x7fd6286e0a53 _ZNSt17_Function_handlerIFSt10unique_ptrINSt13__future_base12_Result_baseENS2_8_DeleterEEvENS1_12_Task_setterIS0_INS1_7_ResultIS0_IN6paddle8platform13EnforceNotMetESt14default_deleteISA_EEEES3_ESt12_Bind_simpleIFSt17reference_wrapperIZNS8_9framework10ThreadPool18RunAndGetExceptionIZNS8_9operatorsL21ParallelExecuteBlocksERKSt6vectorImSaImEEPNSI_8ExecutorERKSM_ISt10shared_ptrINSI_22ExecutorPrepareContextEESaISV_EEPNSI_11ProgramDescEPNSI_5ScopeEEUlvE_EESt6futureISD_ET_EUlvE_EvEESD_EEE9_M_invokeERKSt9_Any_data
@ 0x7fd627cdecee std::__future_base::_State_baseV2::_M_do_set()
@ 0x7fd65c500a99 __pthread_once_slow
@ 0x7fd6286df677 _ZNSt13__future_base11_Task_stateIZN6paddle9framework10ThreadPool18RunAndGetExceptionIZNS1_9operatorsL21ParallelExecuteBlocksERKSt6vectorImSaImEEPNS2_8ExecutorERKS6_ISt10shared_ptrINS2_22ExecutorPrepareContextEESaISF_EEPNS2_11ProgramDescEPNS2_5ScopeEEUlvE_EESt6futureISt10unique_ptrINS1_8platform13EnforceNotMetESt14default_deleteISS_EEET_EUlvE_SaIiEFSV_vEE6_M_runEv
@ 0x7fd6289d5577 paddle::framework::ThreadPool::TaskLoop()
@ 0x7fd5cb0d2c80 (unknown)
@ 0x7fd65c4f96ba start_thread
@ 0x7fd65c22f41d clone
@ 0x0 (unknown)
已经按#1430中打好了补丁,如果用mod的话,不会出错。
related: #1430 (closed)