-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issues with dev xgboost #1087
Comments
Hello @nipnipj 👋 Can you please provide a minimal reprex (reproducible example)? The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it: please help me help you! If you've never heard of a reprex before, start by reading "What is a reprex", and follow the advice further down that page. I'm not able to reproduce the error library(tidymodels)
train_data <- mtcars
rec <- recipe(mpg ~ ., data = train_data)
xgboost_model <-
boost_tree() %>%
set_engine("xgboost") %>%
set_mode("regression")
wf_xgboost <- workflow() %>%
add_recipe(rec) %>%
add_model(xgboost_model)
trained_wf <- wf_xgboost %>% fit(train_data)
trained_wf
#> ══ Workflow [trained] ══════════════════════════════════════════════════════════
#> Preprocessor: Recipe
#> Model: boost_tree()
#>
#> ── Preprocessor ────────────────────────────────────────────────────────────────
#> 0 Recipe Steps
#>
#> ── Model ───────────────────────────────────────────────────────────────────────
#> ##### xgb.Booster
#> raw: 21.6 Kb
#> call:
#> xgboost::xgb.train(params = list(eta = 0.3, max_depth = 6, gamma = 0,
#> colsample_bytree = 1, colsample_bynode = 1, min_child_weight = 1,
#> subsample = 1), data = x$data, nrounds = 15, watchlist = x$watchlist,
#> verbose = 0, nthread = 1, objective = "reg:squarederror")
#> params (as set within xgb.train):
#> eta = "0.3", max_depth = "6", gamma = "0", colsample_bytree = "1", colsample_bynode = "1", min_child_weight = "1", subsample = "1", nthread = "1", objective = "reg:squarederror", validate_parameters = "TRUE"
#> xgb.attributes:
#> niter
#> callbacks:
#> cb.evaluation.log()
#> # of features: 10
#> niter: 15
#> nfeatures : 10
#> evaluation_log:
#> iter training_rmse
#> <num> <num>
#> 1 14.9313149
#> 2 10.9568064
#> ---
#> 14 0.5628964
#> 15 0.4603055 Created on 2024-03-21 with reprex v2.1.0 |
The error persists for me. library(tidymodels)
train_data <- mtcars
rec <- recipe(mpg ~ ., data = train_data)
xgboost_model <-
boost_tree() %>%
set_engine("xgboost") %>%
set_mode("regression")
wf_xgboost <- workflow() %>%
add_recipe(rec) %>%
add_model(xgboost_model)
trained_wf <- wf_xgboost %>% fit(train_data)
#> Error in xgboost::xgb.DMatrix(x, missing = NA, info = info_list): unused argument (info = info_list)
trained_wf
#> Error in eval(expr, envir, enclos): object 'trained_wf' not found Created on 2024-03-22 with reprex v2.1.0 The reason might be because I installed XGBOOST from source. |
Ah, looks like we'd expect to see a few breakages with the new xgboost: dmlc/xgboost#9810. We will address those breakages once xgboost moves to submit to CRAN and lets us know what breaks. As implemented, supporting both the dev and current CRAN versions would be quite gnarly. |
I'm trying to fit a model as follows:
I get the following error:
The text was updated successfully, but these errors were encountered: