| 1579 | } |
| 1580 | |
| 1581 | int LGBM_BoosterDumpModel(BoosterHandle handle, |
| 1582 | int start_iteration, |
| 1583 | int num_iteration, |
| 1584 | int64_t buffer_len, |
| 1585 | int64_t* out_len, |
| 1586 | char* out_str) { |
| 1587 | API_BEGIN(); |
| 1588 | Booster* ref_booster = reinterpret_cast<Booster*>(handle); |
| 1589 | std::string model = ref_booster->DumpModel(start_iteration, num_iteration); |
| 1590 | *out_len = static_cast<int64_t>(model.size()) + 1; |
| 1591 | if (*out_len <= buffer_len) { |
| 1592 | std::memcpy(out_str, model.c_str(), *out_len); |
| 1593 | } |
| 1594 | API_END(); |
| 1595 | } |
| 1596 | |
| 1597 | int LGBM_BoosterGetLeafValue(BoosterHandle handle, |
| 1598 | int tree_idx, |
no test coverage detected