Parameters: { "nrounds" } might not be used

I am using the R bindings in the package xrf. I am making what seems to be a straightforward call to train a model here. The call into xgboost looks like:

    m_xgb <- xgboost(data = design_matrix,
                     label = data[[response_var]],
                     nrounds = xgb_control$nrounds,
                     objective = get_xgboost_objective(family),
                     params = xgb_control,
                     verbose = 0)

Every call, I get the following output:

 WARNING: amalgamation/../src/ 
Parameters: { "nrounds" } might not be used.

  This could be a false alarm, with some parameters getting used by language bindings but
  then being mistakenly passed down to XGBoost core, or some parameter actually being used
  but getting flagged wrongly here. Please open an issue if you find any such cases.

The nrounds parameter is listed in the docs (it’s in fact required to even make this function call), so I’m assuming this is a false positive. If it’s only me encountering this, what am I doing wrong? If every R user of xgboost is encountering this false-positive warning, is this something we need to fix quickly?

Oops, looks like this was covered in release notes here. Giving the name update a whirl.

Updating the param name to nround still produces the warning, although now it’s:

Parameters: { "nround" } might not be used.

Would appreciate any insight!

What version of XGBoost are you using? I just ran the following code using XGBoost and saw no warnings:

data(agaricus.train, package='xgboost')
data(agaricus.test, package='xgboost')
bst <- xgboost(data = agaricus.train$data, label = agaricus.train$label,
               max_depth = 2, eta = 1, nthread = 2, nrounds = 2,
               objective = "binary:logistic")
1 Like

Running your example, I realized my warning was originating from the params list. rming nrounds from that list cleared the warning. Thank you, and sorry for using your time on such a simple mistake!