DmitryUlyanov/Multicore-TSNE

Enabling verbose causes kernel crash (likely a divided by zero)

LucaCappelletti94 opened this issue · 0 comments

I have found the most peculiar bug: if verbose is enabled, with some inputs, the library causes a jupyter kernel crash.

I believe it to be caused by a divide by zero, as when I print the output of the dmesg command I get:

[ 8324.933431]  in libtsne_multicore.so[7fcdffd99000+26000]
[ 8324.933434] traps: ZMQbg/1[7595] trap divide error ip:7fcdffdac3bc sp:7fcdfeb699a0 error:0

You can reproduce the error by running:

import numpy as np
from MulticoreTSNE import MulticoreTSNE

a = np.array([
    [0, 1, 1, 1, 1],
    [1, 0, 1, 2, 1],
    [1, 1, 0, 1, 2],
    [1, 2, 1, 0, 1],
    [1, 1, 2, 1, 0]
])

MulticoreTSNE(
    verbose=True
).fit_transform(a)

You can immediately test it on COLAB here:

COLAB link: https://colab.research.google.com/drive/1uM0GFpLm1Ln_VJRsMLEjyuG0GsnQvZng?usp=sharing