| 1087 | } |
| 1088 | |
| 1089 | int LGBM_BoosterCreateFromModelfile( |
| 1090 | const char* filename, |
| 1091 | int* out_num_iterations, |
| 1092 | BoosterHandle* out) { |
| 1093 | API_BEGIN(); |
| 1094 | auto ret = std::unique_ptr<Booster>(new Booster(filename)); |
| 1095 | *out_num_iterations = ret->GetBoosting()->GetCurrentIteration(); |
| 1096 | *out = ret.release(); |
| 1097 | API_END(); |
| 1098 | } |
| 1099 | |
| 1100 | int LGBM_BoosterLoadModelFromString( |
| 1101 | const char* model_str, |
no test coverage detected