catboost / catboost

A fast, scalable, high performance Gradient Boosting on Decision Trees library, used for ranking, classification, regression and other machine learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.
https://catboost.ai
Apache License 2.0
8.12k stars 1.19k forks source link

Loading model with "loadModel" crashes without any error #2572

Open flancast90 opened 10 months ago

flancast90 commented 10 months ago

Problem: Running the below code using the Catboost NodeJS library. As soon as this line of code is triggered, the application crashes without any sort of error message.

const cbt = require("catboost");

const model = new cbt.Model();
model.loadModel(`./models/saves/nfl_probmodel.cbm`);
console.log("reached this!");

If you run the above code, the console.log(...) line never fires. Instead, the script crashes abruptly at the loadModel line.

For reference, the file it is loading was trained using the Python library, and is 200kb in size. This is a super strange error, I am hoping to get any kind of support on this that I can as this is required for delivery of a mission-critical application.

Catboost Version: Latest Operating System: Windows 11 CPU: N/A GPU: N/A

Evgueni-Petrov-aka-espetrov commented 10 months ago

could you please catboost\node-package\e2e_tests\node-catboost-e2e-test-package\e2e_predict.js

npm i catboost
cd catboost\node-package
node e2e_tests\node-catboost-e2e-test-package\e2e_predict.js

here is my output image

flancast90 commented 10 months ago

could you please catboost\node-package\e2e_tests\node-catboost-e2e-test-package\e2e_predict.js

npm i catboost
cd catboost\node-package
node e2e_tests\node-catboost-e2e-test-package\e2e_predict.js

here is my output image

When I npm i catboost, there is no "catboost" directory created. The "catboost" directory in node_modules is only the nodejs code, and has none of the files you are running. Any suggestions?

Evgueni-Petrov-aka-espetrov commented 10 months ago

could you please catboost\node-package\e2e_tests\node-catboost-e2e-test-package\e2e_predict.js

npm i catboost
cd catboost\node-package
node e2e_tests\node-catboost-e2e-test-package\e2e_predict.js

here is my output image

When I npm i catboost, there is no "catboost" directory created. The "catboost" directory in node_modules is only the nodejs code, and has none of the files you are running. Any suggestions?

to get catboost source code, please do git clone https://github.com/catboost/catboost.git