我的jupyter笔记本内核在尝试使用以下方法创建XGBoost DMatrix时没有错误消息就死了:
# Create the XGBoost DMatrix
dtrain = xgb.DMatrix(X_train, y_train)我尝试过以下几种方法,但没有任何运气:
import os os.environ['KMP_DUPLICATE_LIB_OK']='True'包括在笔记本的顶部,如这条线所示brew install libomp更新libompmambaforge包管理器我不知道该到哪里去看看。任何帮助/输入都非常欢迎。
--
在本地使用xgboost时再现错误的MRE:
# create dummy data
d = {
'y': [1, 0, 0, 1],
'x1': [1, 2, 3, 4],
'x2': [5, 6, 7, 8],
'x3': [9, 0, 1, 2]}
df = pd.DataFrame(data=d)
# create train/test splits
X, y = df.iloc[:, 1:], df["y"]
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.25, shuffle=True, random_state=2)
# Create the XGBoost DMatrix
dtrain = xgb.DMatrix(X_train, y_train)我的工作是:
注意:我尝试过降低XGBoost的评级。V1.2.0会创建DMatrix,但是在调用xgb.train(params,dtrain)时会出现相同的行为(没有错误消息,内核会死)。
发布于 2021-10-21 15:14:32
我什么都试过了,也面临着同样的使用,对我起作用的是将libomp的版本降级为11.1.0。
brew uninstall libomp
brew install libomp@11.1.0然后重新启动朱庇特。
https://stackoverflow.com/questions/68892686
复制相似问题