numpy 2.0.0 support
I ran pip install 'litgpt[all]' which I suppose has numpy latest as dep. Numpy 2.0.0 has just been released. So I'm getting the error below whilst trying litgpt download list. For now, forced downgrade - pip install --upgrade numpy==1.26.4 - removed the error.
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Thanks for the note. I'll pin numpy==1.26.4 for now and then investigate further regarding the changes in the NumPy 2.0 release this week.
https://stackoverflow.com/questions/78641150/a-module-that-was-compiled-using-numpy-1-x-cannot-be-run-in-numpy-2-0-0-as-it-ma/78641405?noredirect=1#comment138648878_78641405
I did a quick test and it looks like it's better to stick to an older version of numpy for some time (a month maybe?). While the latest version of torch (2.3.1) supports numpy 2.0, not all other dependencies can state the same. For instance tensorboard can throw this error:
AttributeError:
np.string_was removed in the NumPy 2.0 release. Usenp.bytes_instead.. Did you mean: 'strings'?
In addition, other Lightning dependencies like Thunder also pinned to an older version of numpy.
So let's revisit the issue somewhere in July.
I can echo this and would say let's wait at least a month before we revisit this to give all the dependencies time to catch up.