You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encounter a segmentation fault (error 139) when running UMAP transform using:
umap-learn: 0.5.6
numba: 0.59.1
scikit-learn: 1.4.2
numpy: 1.26.4
scipy: 1.13.0
llvmlite: 0.42.0
python: 3.12.0
The issue arises specifically when applying the transform method of UMAP within a scikit-learn Pipeline.
Code to Reproduce:
if len(X) <= max_train_size:
X_train, y_train = X, y
else:
X_train, _, y_train, _ = train_test_split(X, y, random_state=1, train_size=max_train_size, stratify=y)
# Create transformer pipelie:
pipe = Pipeline([
('scaler', StandardScaler(with_mean=False)),
('reducer', UMAP(random_state=1, n_components=n_components, n_jobs=1, verbose=True, metric='cosine')),
])
# Fit transformer on train data and then transform all the data:
with warnings.catch_warnings():
warnings.simplefilter("ignore")
logging.info('\tFitting UMAP pipeline')
pipe.fit(X_train, y_train)
logging.info('\tApplying UMAP to reduce dimensionality')
X_reduced = pipe.transform(X)
Error Trace:
The process fails with the following trace:
I encounter a segmentation fault (error 139) when running UMAP transform using:
umap-learn: 0.5.6
numba: 0.59.1
scikit-learn: 1.4.2
numpy: 1.26.4
scipy: 1.13.0
llvmlite: 0.42.0
python: 3.12.0
The issue arises specifically when applying the transform method of UMAP within a scikit-learn Pipeline.
Code to Reproduce:
if len(X) <= max_train_size:
X_train, y_train = X, y
else:
X_train, _, y_train, _ = train_test_split(X, y, random_state=1, train_size=max_train_size, stratify=y)
# Create transformer pipelie:
pipe = Pipeline([
('scaler', StandardScaler(with_mean=False)),
('reducer', UMAP(random_state=1, n_components=n_components, n_jobs=1, verbose=True, metric='cosine')),
])
# Fit transformer on train data and then transform all the data:
with warnings.catch_warnings():
warnings.simplefilter("ignore")
logging.info('\tFitting UMAP pipeline')
pipe.fit(X_train, y_train)
logging.info('\tApplying UMAP to reduce dimensionality')
X_reduced = pipe.transform(X)
Error Trace:
The process fails with the following trace:
2024-06-16 11:13:27 2024-06-16 08:13:27,473 - INFO ::: Applying UMAP to reduce dimensionality
2024-06-16 11:13:48 *** signal 11
2024-06-16 11:13:48 Register dump:
2024-06-16 11:13:48
2024-06-16 11:13:48 RAX: fffffffffffffff9 RBX: 00007fc898e01050 RCX: fffffffffffffffa
2024-06-16 11:13:48 RDX: 0000000000000001 RSI: 00007fff5c95aff0 RDI: 0000000014d8c6f0
2024-06-16 11:13:48 RBP: 00007fc8669f9000 R8 : 000000000000000e R9 : 0000000000000004
2024-06-16 11:13:48 R10: 0000000000000004 R11: 0000000000000001 R12: 0000000009d44940
2024-06-16 11:13:48 R13: 00007fc8669f9000 R14: 0000000014d8c6f0 R15: 0000000000000007
2024-06-16 11:13:48 RSP: 00007fff5c95aea0
2024-06-16 11:13:48
2024-06-16 11:13:48 RIP: 00007fc86b03d0a4 EFLAGS: 00010213
2024-06-16 11:13:48
2024-06-16 11:13:48 CS: 0033 FS: 0000 GS: 0000
2024-06-16 11:13:48
2024-06-16 11:13:48 Trap: 0000000e Error: 00000004 OldMask: 00000000 CR2: 669f8ffc
2024-06-16 11:13:48
2024-06-16 11:13:48 FPUCW: 0000037f FPUSW: 00000020 TAG: 00007fc8
2024-06-16 11:13:48 RIP: b1bb3af9 RDP: 00000000
2024-06-16 11:13:48
2024-06-16 11:13:48 ST(0) 0000 0000000000000000 ST(1) 0000 0000000000000000
2024-06-16 11:13:48 ST(2) 0000 0000000000000000 ST(3) ffff 8000000000000000
2024-06-16 11:13:48 ST(4) ffff 8000000000000000 ST(5) 0000 0000000000000000
2024-06-16 11:13:48 ST(6) ffff 8000000000000000 ST(7) ffff ffffffffe219652c
2024-06-16 11:13:48 mxcsr: 1fa2
2024-06-16 11:13:48 XMM0: 00000000000000000000000000000000 XMM1: 00000000000000000000000000000000
2024-06-16 11:13:48 XMM2: 00000000000000000000000000000000 XMM3: 00000000000000000000000000000000
2024-06-16 11:13:48 XMM4: 00000000000000000000000000000000 XMM5: 00000000000000000000000000000000
2024-06-16 11:13:48 XMM6: 00000000000000000000000000000000 XMM7: 00000000000000000000000000000000
2024-06-16 11:13:48 XMM8: 00000000000000000000000000000000 XMM9: 00000000000000000000000000000000
2024-06-16 11:13:48 XMM10: 00000000000000000000000000000000 XMM11: 00000000000000000000000000000000
2024-06-16 11:13:48 XMM12: 00000000000000000000000000000000 XMM13: 00000000000000000000000000000000
2024-06-16 11:13:48 XMM14: 00000000000000000000000000000000 XMM15: 00000000000000000000000000000000
2024-06-16 11:13:48
2024-06-16 11:13:48 Backtrace:
2024-06-16 11:13:48 [0x7fc86b03d0a4]
2024-06-16 11:13:48 [0x7fc86b03a23e]
2024-06-16 11:13:48 [0x7fc86b02374e]
2024-06-16 11:13:48 [0x7fc86b024f13]
2024-06-16 11:13:48 /var/lang/lib/python3.12/site-packages/numba/_dispatcher.cpython-312-x86_64-linux-gnu.so(+0x403c)[0x7fc87196c03c]
2024-06-16 11:13:48 /var/lang/lib/python3.12/site-packages/numba/_dispatcher.cpython-312-x86_64-linux-gnu.so(+0x4382)[0x7fc87196c382]
2024-06-16 11:13:48 /var/lang/lib/libpython3.12.so.1.0(_PyObject_MakeTpCall+0x31b)[0x7fc8b43fa24b]
2024-06-16 11:13:48 /var/lang/lib/libpython3.12.so.1.0(_PyEval_EvalFrameDefault+0x6f9)[0x7fc8b4402659]
2024-06-16 11:13:48 /var/lang/lib/libpython3.12.so.1.0(+0x262108)[0x7fc8b445a108]
2024-06-16 11:13:48 /var/lang/lib/libpython3.12.so.1.0(_PyEval_EvalFrameDefault+0x59d3)[0x7fc8b4407933]
2024-06-16 11:13:48 /var/lang/lib/libpython3.12.so.1.0(PyEval_EvalCode+0x9c)[0x7fc8b44c89ac]
The text was updated successfully, but these errors were encountered: