| 1201 | } |
| 1202 | |
| 1203 | int LGBM_BoosterUpdateOneIterCustom2(BoosterHandle handle, |
| 1204 | const float* grad, |
| 1205 | const float* hess, |
| 1206 | const float* grad2, |
| 1207 | const float* hess2, |
| 1208 | int* is_finished) { |
| 1209 | API_BEGIN(); |
| 1210 | Booster* ref_booster = reinterpret_cast<Booster*>(handle); |
| 1211 | #ifdef SCORE_T_USE_DOUBLE |
| 1212 | Log::Fatal("Don't support custom loss function when SCORE_T_USE_DOUBLE is enabled"); |
| 1213 | #else |
| 1214 | if (ref_booster->TrainOneIter_new(grad, hess, grad2, hess2)) { |
| 1215 | *is_finished = 1; |
| 1216 | } else { |
| 1217 | *is_finished = 0; |
| 1218 | } |
| 1219 | #endif |
| 1220 | API_END(); |
| 1221 | } |
| 1222 | |
| 1223 | int LGBM_BoosterRollbackOneIter(BoosterHandle handle) { |
| 1224 | API_BEGIN(); |
nothing calls this directly
no test coverage detected