-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Problem: Problem loading Multiclassification Catboost model in Node.
catboost version: 1.0.0
Operating System: MacOS 12.0.1
Seeing error trying to load Multiclassification Catboost model in Node. Works fine for ClassificationCatboot model.
let model = new catboost.Model()
model.loadModel('../predictor.cbm')
console.log(model.predict([[1.31, 19, 5, 18]], [['ProQuoAI', 'adhoc']]))
Ful error:
void NCB::NModelEvaluation::NDetail::CalcGeneric<NCB::NModelEvaluation::NDetail::TCpuEvaluator::Calc(TArrayRef<TArrayRef<float const> const>, TArrayRef<TArrayRef<TBasicStringBuf<char, std::__y1::char_traits<char> > const> const>, TArrayRef<TArrayRef<TBasicStringBuf<char, std::__y1::char_traits<char> > const> const>, unsigned long, unsigned long, TArrayRef<double>, NCB::NModelEvaluation::TFeatureLayout const*) const::'lambda'(TFeaturePosition, unsigned long), NCB::NModelEvaluation::NDetail::TCpuEvaluator::Calc(TArrayRef<TArrayRef<float const> const>, TArrayRef<TArrayRef<TBasicStringBuf<char, std::__y1::char_traits<char> > const> const>, TArrayRef<TArrayRef<TBasicStringBuf<char, std::__y1::char_traits<char> > const> const>, unsigned long, unsigned long, TArrayRef<double>, NCB::NModelEvaluation::TFeatureLayout const*) const::'lambda0'(TFeaturePosition, unsigned long), NCB::NModelEvaluation::NDetail::TCpuEvaluator::Calc(TArrayRef<TArrayRef<float const> const>, TArrayRef<TArrayRef<TBasicStringBuf<char, std::__y1:+535 (0x114E5FD07)
NCB::NModelEvaluation::NDetail::TCpuEvaluator::Calc(TArrayRef<TArrayRef<float const> const>, TArrayRef<TArrayRef<TBasicStringBuf<char, std::__y1::char_traits<char> > const> const>, unsigned long, unsigned long, TArrayRef<double>, NCB::NModelEvaluation::TFeatureLayout const*) const+304 (0x114E44400)
TFullModel::Calc(TArrayRef<TArrayRef<float const> const>, TArrayRef<TVector<TBasicStringBuf<char, std::__y1::char_traits<char> >, std::__y1::allocator<TBasicStringBuf<char, std::__y1::char_traits<char> > > > const>, unsigned long, unsigned long, TArrayRef<double>, NCB::NModelEvaluation::TFeatureLayout const*) const+419 (0x1151FB903)
CalcModelPrediction+894 (0x114E79DBE)
NNodeCatBoost::TModel::CalcPredictionString(Napi::Env, TVector<float, std::__1::allocator<float> > const&, Napi::Array const&)+1788 (0x112C794BC)
NNodeCatBoost::TModel::CalcPrediction(Napi::CallbackInfo const&)+2072 (0x112C77B68)
Napi::ObjectWrap<NNodeCatBoost::TModel>::InstanceMethodCallbackWrapper(napi_env__*, napi_callback_info__*)::'lambda'()::operator()() const+139 (0x112C7A3BB)
Napi::ObjectWrap<NNodeCatBoost::TModel>::InstanceMethodCallbackWrapper(napi_env__*, napi_callback_info__*)+42 (0x112C7A2DA)
v8impl::(anonymous namespace)::FunctionCallbackWrapper::Invoke(v8::FunctionCallbackInfo<v8::Value> const&)+122 (0x10007686A)
v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo)+616 (0x1002664C8)
v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments)+524 (0x100265A5C)
v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*)+258 (0x1002651C2)
(TCatBoostException) catboost/libs/model/eval_processing.cpp:24: `results` size is insufficient: Results.size() = 1, resultApproxDimension = 2, docCount * resultApproxDimension = 2
at /Users/tommy/eureka-lambdas/functions/build/sandbox.js:99:31
at step (/Users/tommy/eureka-lambdas/functions/build/sandbox.js:33:23)
at Object.next (/Users/tommy/eureka-lambdas/functions/build/sandbox.js:14:53)
at /Users/tommy/eureka-lambdas/functions/build/sandbox.js:8:71
at new Promise (<anonymous>)
at __awaiter (/Users/tommy/eureka-lambdas/functions/build/sandbox.js:4:12)
at test (/Users/tommy/eureka-lambdas/functions/build/sandbox.js:94:12)
at Object.<anonymous> (/Users/tommy/eureka-lambdas/functions/build/sandbox.js:92:1)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:33277) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:33277) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```