-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] PyPy support #11010
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
[MRG] PyPy support #11010
Conversation
This allows pypy3 to run and pass most tests.
Thanks for working on this @rlamy ! For future reference to create a Python 3.5 environment with PyPy 5.10.1, I used the following steps,
|
I added CI setup for PyPy and disabled other builds temporarly to avoid uncessary runs. Also copied the cython code that includes Unfortunately,
generally I'm not sure if it's worth spending time on fixing this as locally the test suite with PyPy 3 takes ~30min for me (without the examples), so accounting for the time to build scipy I am not sure we will be able to run the test suite within the 50 min limit on Travis CI. The output of the test suite I am getting locally with PyPy 3 - 5.10.1 can be found in Benchmark wise, we need to think which existing benchmarks under |
The Travis CI docs are always misleading about what Pythons are actually available. If you want to actually know, the secret trick is to look directly at their s3 bucket:
So for example, right now that list includes |
Thanks for the trick @njsmith! will use On another topic, for future reference, I opened an issue at PyPy regarding |
build_tools/travis/install.sh
Outdated
ls ~/virtualenv/ | ||
pip install numpy Cython Tempita | ||
# use scipy 1.1 when it's released | ||
pip install -vv git+https://github.com/scipy/scipy.git@b3162e187174fa0b1462f7b243c483285b38f45e |
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.
pip install scipy==1.1.0rc1
may be easier to remember (and maybe gets rid of the Cython timeout, since it's pre-cythonized)...
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, fixed! Sorry I missed the RC announcement...
Using scipy 1.1.rc1 worked much better in CI, thank you. Current status:
CircleCI seems to have a larger maximum allowed build time (5hours) so I'll try to use that instead. |
Using @antocuni 's pypy-wheels should make the install much faster. Unfortunately, there is no suitable scipy wheel yet, but we can at least get numpy. |
Well, numpy seems to be pre-installed by Travis, so this doesn't change anything. |
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.
LGTM.
pypy3 build setup is failing:
|
doc/faq.rst
Outdated
in PyPy is complete or near-complete, and SciPy is ported over as well, | ||
we can start thinking of a port. | ||
We use too much of NumPy to work with a partial implementation. | ||
just-in-time compiling Python implementation. Experimental support for |
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 would rather say: "PyPy <http://pypy.org/>
_ is an alternative Python implementation with a built-in just-in-time compiler."
It's not that new anymore. It is fast in many case but for scikit-learn users it's quite unlikely to improve speed significantly on our models as they already rely on numpy and Cython.
Let's merge. |
Thanks @jnothman , the issue was that Circle CI was down, and so it didn't trigger at the last commit, and the PyPy build didn't pass on master. I'll try to fix it in a separate PR, but a temporary workaround could be to disable the corresponding pypy3 build in CircleCI to avoid failing CI status on master... |
+1 |
Seems that we're running pypi (which fails) in PRs, which might confuse contributors and block codecov from providing results. Maybe we need a temporary workaround ASAP. |
Temporary workaround applied in 6e94a63 |
Hi to all. I just participated to the EuroSciPy 2018 sprint about PyPy. I am trying to build a dockerized pypy/numpy/scipy/scikitlearn set with jupyter notebook image.
( source repo here , please open issues ) Result of
How can I quickly fix the error:
Thank's. |
@giodegas Great to know you are working on this! Please make sure you are using the just released 0.20.rc1 -- version 0.19 doesn't support PyPy. Also it's expected that you would get some tests failures on Python 2, there shouldn't be any on Python 3. If you do experience other problems please open a new issue. |
Also I would like to thank @rlamy for starting this effort, and all reviewers for very helpful suggestions! (I still need to re-enable PyPy CI probably in a Circle CI Cron job) |
I also get the error:
|
@rth done the upgrade to 0.20.rc1. New error showing up... |
@rth I am testing starting from latest pypy3 docker image. |
@giodegas Could you please open a new issue with this information? |
Here suggests to do:
instead of
|
moved to #11971 |
Reference Issues/PRs
See #8625
What does this implement/fix? Explain your changes.
Working on adding PyPy support.