Feature request - C API - support raw data as input for in-place prediction
- Dominant language
- C++
- Stars
- 28.8k
- Forks
- 8.9k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 54
Description
In-place prediction is supposed to be fast and efficient according to https://xgboost.readthedocs.io/en/stable/prediction.html#in-place-prediction
[C API](https://xgboost.readthedocs.io/en/stable/c.html#_CPPv425XGBoosterPredictFromDense13BoosterHandlePKcPKc13DMatrixHandlePPK9bst_ulongP9bst_ulongPPKf) only supports JSON string as input for in-place prediction which requires conversion from raw data to char array which later is converted back to raw data. It would be more efficient to support raw data without JSON conversion. In my case, the input is a simple 1D float array.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the XGBoosterPredictFromDense C API entry point and trace how its JSON input is converted before prediction. Confirm the supported raw-data shape and pointer contract, then verify that an in-place prediction accepts a 1D float array without JSON conversion and produces the expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp
- Domain
- api, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100