Skip to content
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

Travis: Add pypy3 #883

Closed
wants to merge 1 commit into from
Closed

Travis: Add pypy3 #883

wants to merge 1 commit into from

Conversation

rht
Copy link
Contributor

@rht rht commented Aug 18, 2020

This addresses #882.

@codecov
Copy link

codecov bot commented Aug 18, 2020

Codecov Report

Merging #883 (9453b67) into master (8a8e05c) will decrease coverage by 2.71%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #883      +/-   ##
==========================================
- Coverage   88.86%   86.14%   -2.72%     
==========================================
  Files          19       20       +1     
  Lines        1132     1083      -49     
  Branches      189      171      -18     
==========================================
- Hits         1006      933      -73     
- Misses         92      121      +29     
+ Partials       34       29       -5     
Impacted Files Coverage Δ
mesa/batchrunner.py 73.74% <0.00%> (-16.31%) ⬇️
mesa/datacollection.py 97.46% <0.00%> (-0.24%) ⬇️
mesa/time.py 95.45% <0.00%> (-0.07%) ⬇️
mesa/model.py 100.00% <0.00%> (ø)
mesa/visualization/TextVisualization.py 0.00% <0.00%> (ø)
mesa/visualization/modules/TextVisualization.py 100.00% <0.00%> (ø)
mesa/visualization/__init__.py 100.00% <0.00%> (ø)
mesa/visualization/modules/HexGridVisualization.py 96.42% <0.00%> (+0.13%) ⬆️
...a/visualization/modules/CanvasGridVisualization.py 96.00% <0.00%> (+0.16%) ⬆️
mesa/visualization/ModularVisualization.py 76.66% <0.00%> (+0.19%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a8e05c...319165a. Read the comment docs.

@rht
Copy link
Contributor Author

rht commented Aug 18, 2020

I'm not sure why there is no Travis running here ...

@Corvince
Copy link
Contributor

I'm not sure why there is no Travis running here ...

No idea why it doesn't show up. It did run though, but failed at installing pandas (https://travis-ci.org/github/projectmesa/mesa/jobs/718907972)

@rht
Copy link
Contributor Author

rht commented Aug 20, 2020

It looks like it fails at pandas' dependency, ujson. I will keep this PR open and retry on future version of PyPy. Though PyPy developers claimed that pandas has been supported since pypy5.9 (https://doc.pypy.org/en/latest/release-v5.9.0.html#pypy2-7-and-pypy3-5-v5-9-dual-release). The current Travis PyPy is 7.1.1.

@Corvince
Copy link
Contributor

Your link only mentions pypy2.7, but from what I could infer from googling around, yes, it should work with pandas. Maybe just an issue with travis? @rht could you (or someone else) try it locally?

@rht
Copy link
Contributor Author

rht commented Aug 21, 2020

Tested on my laptop.
pypy3-7.3.1:

97 passed, 1 warning in 11.26s ================================================

With normal python 3.8

97 passed, 2 warnings in 11.63s ===============================================

@rht
Copy link
Contributor Author

rht commented Aug 21, 2020

I probably need a simulation with a huge grid size in order to highlight PyPy's speedup.

@rht
Copy link
Contributor Author

rht commented Aug 27, 2020

I ran the comparison on the bank_reserves example, because it doesn't have the web GUI.
The speedup is significant!
PyPy3-7.3.1

python batch_run.py  89.72s user 2.78s system 100% cpu 1:31.72 total

CPython 3.8

python batch_run.py  173.73s user 2.19s system 100% cpu 2:55.10 total

A 1.9x speedup!

@rht
Copy link
Contributor Author

rht commented Aug 27, 2020

Here I removed 3.5 to make room for PyPy3. This is also justified by the fact that 3.5's EOL 2020-09-13.

@rht rht closed this Jan 1, 2021
@rht rht deleted the master branch September 16, 2023 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants