Skip to content
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

Kernel dies when creating DMatrix #7191

Closed
avriiil opened this issue Aug 26, 2021 · 4 comments
Closed

Kernel dies when creating DMatrix #7191

avriiil opened this issue Aug 26, 2021 · 4 comments

Comments

@avriiil
Copy link

avriiil commented Aug 26, 2021

My kernel dies without an error message when trying to create an XGBoost DMatrix using:

# Create the XGBoost DMatrix
dtrain = xgb.DMatrix(X_train, y_train)

I’ve tried the following without any luck:

  • deleting libiomp5.dylib as per this thread
  • including import os os.environ['KMP_DUPLICATE_LIB_OK']='True' at the top of the notebook as per this thread
  • updating libomp using brew install libomp
  • reinstalling my mambaforge package manager

I'm working on an M1 Macbook Pro and wonder if that might be the issue. My colleague is able to run this code without a problem on a non-M1 machine.

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)

I'm working with:

  • a 2020 M1 Macbook Pro
  • Python: 3.9 / 3.8
  • XGBoost: 1.4.2 / 1.2.0
  • Pandas: 1.3.1
  • Numpy: 1.21.2

I've followed the steps in this article to install xgboost (python and all dependencies through mambaforge, then xgboost from pip)

NOTE: I've tried downgrading XGBoost. v 1.2.0 creates the DMatrix but fails with the same behaviour (no error message, kernel dies) when calling xgb.train(params,dtrain).

Is this a known issue on M1? Is there a workaround?

@hcho3
Copy link
Collaborator

hcho3 commented Aug 26, 2021

We do not officially support Apple Silicon (M1), in the sense that we have not tested XGBoost for it. Issues are expected.

@avriiil
Copy link
Author

avriiil commented Aug 30, 2021

OK, thanks for the update @hcho3. Is there any roadmap for when you will be testing/rolling out support for XGboost on M1?

@trivialfis
Copy link
Member

Not at the moment. Github action doesn't have M1 instance actions/runner-images#2187 and AFAIK none of the active maintainers has one.

@avriiil
Copy link
Author

avriiil commented Aug 31, 2021 via email

@hcho3 hcho3 closed this as completed Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants