Storing xgboost models in data.tables fails
- Dominant language
- C++
- Stars
- 28.8k
- Forks
- 8.9k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 54
Description
Hey, we try to make mlr3 compatible with the new xgboost R package 3.1.2.1. We store models in `data.table` list columns. This does not work anymore with the new version.
```r
library(data.table)
library(xgboost)
data(mtcars)
model_regression = xgboost(mtcars[, -1], mtcars$mpg, nthreads = 1, nrounds = 3)
data.table(model = list(model_regression))
# Error in y[] <- lapply(y, reallocate) :
# ALTLIST classes must provide a Set_elt method [class: XGBAltrepPointerClass, pkg: xgboost]
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the reported R reproduction with xgboost 3.1.2.1 and data.table, then inspect how the model's XGBAltrepPointerClass is stored in a list column. Done means data.table(model = list(model_regression)) succeeds without the ALTLIST Set_elt error and preserves the model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100