CUMLSec / trex

MIT License
90 stars 13 forks source link

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject #2

Closed ice-tong closed 3 years ago

ice-tong commented 3 years ago

Follow the finetune step in readme, arise value error:

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

peikexin9 commented 3 years ago

Hi @ice-tong, I noticed this error. I might need some time to fix it. Will update.

ice-tong commented 3 years ago

Thanks your reply!

I'm very interest in your work.
I want to known how to pretrain micro-tracing language model, and whether the code of pretrain and micro-tracing by Unicorn will open source.

Thanks again!

peikexin9 commented 3 years ago

Hi @ice-tong, thanks for your interest! Seems the incompatibility is due to the version mismatch of library and cuda. See if installing matching nvidia-driver+cuda+pytorch would resolve the issue.

I have also uploaded sample pretraining data, scripts, and instructions in README. Hope that can be helpful to you. For micro-tracing based on Unicorn, you can take a look at https://github.com/mrphrazer/kadabra. I am largely inspired by their implementation.

ice-tong commented 3 years ago

Thanks, you are so warmhearted. I will try the solution you have given.

ice-tong commented 3 years ago

Hi Kexin, I fix this problem by conda install numpy==1.20.0 -c conda-forge. It seems a problem brought by the incorrect version of NumPy.
Note: the latest version of NumPy in the default conda channel is 1.19.x

Thanks for your help again!