-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fixes Pip installed NumPy performance issue. #115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try it out on both of my machines tonight.
So I ran into some problems that might prevent this being automatic with Preparing editable metadata (pyproject.toml) ... done
ERROR: Could not find a version that satisfies the requirement intel-numpy==1.21.4 (from pybert) (from versions: none)
ERROR: No matching distribution found for intel-numpy==1.21.4 Looking at https://pypi.org/project/intel-numpy/ and https://anaconda.org/intel/numpy, you have to tell pip to grab this from the anaconda index not pypi. I've not found how to do this in our pyproject.toml file directly yet. All signs point to it not being supported yet and you have to use the So right now, I think we pick a version of numpy that exists in both servers and update our install instructions only. We would have to also make this change in pyibis-ami since otherwise they will have conflicting dependencies. Should work since intel/simple only has numpy so the rest come from pypi or pip install PyBERT
pip uninstall numpy
pip install -i https://pypi.anaconda.org/intel/simple --extra-index-url https://pypi.org/simple numpy |
So, I guess the only reason it's working for me is I use
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdpatt , are you going to validate the pip -i ...
approach, or should I?
I think it makes more sense for you to try this, since I'm not hitting the error (probably, due to my use of conda
).
Thanks,
-db
Yeah, I'll keep playing to see if I can get some way that is repeatable across my machines for installing and confirming the unit tests were using the intel-numpy on my machine and not actually installing the normal numpy. |
Oh, and I keep forgetting to mention: I do have an old (2012) MacBook Air. Happy Holidays, friend! P.S. - Sorry, one more thing: are you comfortable with a revision to the Faces of PyBERT collage that places us both in the center of the circle and in equally sized frames? |
So as far as I can tell, you can totally use pip to install numpy-intel but only if you have conda or intel's python distribution since they will do a lot of magic for you behind the scenes to really override pip. I have not had any success and I can only get blas which comes with vanilla numpy when using vanilla python. My speed bump was actually from the first run compared to a byte compiled/cached run. Even piecemeal installing each package, didn't work. |
Sorry, are you saying that now even |
Yeah, turns out that was pip falling back to regular numpy and not telling me. Found that np.show_config() will show you BLAS or not. |
Okay, so what is your recommendation for bringing this one to closure? |
I think conda continues to be the one that is pushed in every install guide and if users (like me) still want to use pypi and not conda that we have to live with a performance hit. I don't easily see a way to make these libraries accessible to pypi users of pybert. I've updated https://github.com/capn-freako/PyBERT/wiki/instant_gratification as such. |
Shoot! I just tried the trick proposed by @jdpatt:
I think the problem is v1.22.3 is the latest version of the I suppose we could try backing off the general package to v1.22.3 and see if anything breaks. |
If you open up a python terminal and run I would have it correctly install but it silently fell back to normal numpy. |
Yeah, I think I'm seeing the same as you:
And the observed PyBERT performance is just: 0.6 Msmpls./min. :( Wow! That was a lot of work for nothing. :( I'm going to close this. |
D'oh! I forgot, I do want to merge these changes into @jdpatt , I'm about to commit/push. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @jdpatt !
-db
Hey David,
I implemented the proposed solution from that SO post.
Would you test this, please, and let me know what you find?
Thanks!
-db