-
Notifications
You must be signed in to change notification settings - Fork 88
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
Release 3.1.7 depends on numpy >= 1.22.0 #100
Comments
Thank you for reporting this. It seems we run into this problem almost every year, so it was time... 😅 I think this is really issue with conda being slow with switching to latest versions. There is no easy way to know when this will occur and for how long it would make sense to keep ARC built fixed to older Numpy version. Also, if we do fix to older version we might not get possibly important Numpy bug fixes. So I think it's best solved with pip installation of latest version of Numpy as you did. To try to save the trouble for other users, I opened a discussion #101 , where I linked three occurrences of this issue in the past. |
This is a totally fine response, and the explicit discussion page will hopefully help others find the quick solution. I do have a caveat to this though. I'm currently working on a module that depends on numpy and ARC. When I went to pip numpy, I discovered that some core functionality I was using became significantly slower. This is apparently due to the fact that numpy on pip is built against OpenBLAS while numpy on conda is built against IntelMKL. Apparently I've been relying on some cleverness in the IntelMKL. This obviously isn't an ARC problem, but is a potential scenario where one has to install numpy from conda, even if it isn't the latest and greatest (yet). But I wonder if there isn't some way for ARC to pull most recent available numpy (to keep on top of bug fixes), while still being backward compatible. Doing some quick searching, it appears numpy has chosen a backwards compatibility only model when it comes to build dependencies (so build with 1.16, run with 1.17 is fine; build with 1.17, run with 1.16 is not). In the numpy docs, they recommend building against the lowest version of numpy you want to support, and then pinning runtime dependencies a few versions into the future to protect against deprecation removals from breaking automated builds. Would this be an acceptable compromise? |
Ah yes, I had run into that problem in the past too. Indeed Numpy backend is drastically different depending on the source of the distribution, which has strong influence on the performance.
Let's try what you suggested then. I limited now Numpy version to <=1.21.2 that as far as I see is supported in conda. |
v3.1.8 works out of the box on conda. Thanks Nikola! As for version ranges, I wonder if you could play with them a bit to allow users to install a newer version of numpy while building against an older one? Forgive me if this is wrong since I'm fairly new to github workflows, but my understanding is that your build dependencies are specified in And if you want to make things a little easier on yourself, so you don't have to keep updating build pins as releases march forward, scipy provides a meta pip package for exactly this purpose called oldest-supported-numpy. Apparently this package should track and scale with python versions and platforms seemlessly. Fair warning, I haven't needed to do any of this kind of stuff before so your experience may be different. It is the recommended method by the numpy devs though. In any case, if you want to attempt these build shenanigans, I'm happy to test. If you want to leave it as is, I'm obviously happy with that too. I'm just glad ARC exists and is such a great resource! |
Many thanks for the feedback David! This is fantastic, since not a lot of people are willing to dive into built dependencies web, and even smaller number of people comes out with a good advice, as you did. 😄 I have implemented suggested changes, and it seems that things worked out as planned. 🤞 A new version is |
That is very high praise coming from you Nikola. Glad I could help. This works perfectly for me as well. |
Running a fresh install in a conda environment, I get the following error when instantiating an atom.
Much like #25, with a little digging, it appears the current release was built against numpy>=1.22.0, which included some more code reorganization. But that version of numpy hasn't made it to main conda channels yet. I did confirm that installing numpy 1.22.2 from pip removes the error.
The text was updated successfully, but these errors were encountered: