Xgboost uses Bayesian Modules to find the optimal solution for error reporting

when I use BayesianOptimization to find the optimal parameter of xgboost in the python environment,
IndexError: too many indices for array error occurs

Code:

def xgboostcv(
              max_depth,
              learning_rate,
              n_estimators,
              gamma,
              min_child_weight,
              subsample,
              colsample_bytree,
              silent=True,
              nthread=-1):
    return cross_val_score(xgb.XGBRegressor(max_depth=int(max_depth),
                                            learning_rate=learning_rate,
                                            n_estimators=int(n_estimators),
                                            gamma=gamma,
                                            min_child_weight=min_child_weight,
                                            subsample=subsample,
                                            colsample_bytree=colsample_bytree,
                                            silent=silent,
                                            nthread=nthread),
                           X_train,
                           y_train,
                           "r2",
                           cv=5).mean()

if __name__ == "__main__":
    
    xgboostBO = BayesianOptimization(xgboostcv,
                                 {"max_depth": (3, 20),
                                  "learning_rate": (0.01, 0.),
                                  "n_estimators":(800,1200),
                                  "gamma": (0.01,1.00),
                                  "min_child_weight": (1, 10),
                                  "subsample": (0.5, 1),
                                  "colsample_bytree":( 0.5, 1),
                                  })
    xgboostBO.maximize(init_points=2, n_iter = 10)
    print("-"*50)
    print("Final Results")
    print("XGBOOST: %f" % xgboostBO.res["max"]["max_val"])

error report:

clipboard.png
I tried to find out the cause of this problem on Baidu and Google, but the answer I found failed to solve my problem. I would appreciate it if anyone could answer my question.

Mar.30,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf742e-3205a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf742e-3205a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?