-
Notifications
You must be signed in to change notification settings - Fork 661
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
Updated cimport for numpy to maintain cimport consistency #4346
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.
Hello there first time contributor! Welcome to the MDAnalysis community! We ask that all contributors abide by our Code of Conduct and that first time contributors introduce themselves on the developer mailing list so we can get to know you. You can learn more about participating here. Please also add yourself to package/AUTHORS
as part of this PR.
Linter Bot Results:Hi @Sumit112192! Thanks for making this PR. We linted your code and found the following: There are currently no issues detected! 🎉 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4346 +/- ##
==========================================
Coverage 93.37% 93.37%
==========================================
Files 170 184 +14
Lines 22340 23453 +1113
Branches 4085 4085
==========================================
+ Hits 20859 21899 +1040
- Misses 963 1036 +73
Partials 518 518 ☔ View full report in Codecov by Sentry. |
Thanks for the PR @Sumit112192. Looks like a few tests timed out, I'll restart them before having a deeper look. |
In the meantime, please add yourself to the |
I believe part of the work that needs doing is checking (maybe adding) benchmarks to ensure that performance isn't affected? If I remember correctly that was an ask from @hmacdope last time someone started a PR on this. |
Indeed: #3978 (comment) |
@Sumit112192 @IAlibay @RMeli Yes, thanks for taking an intial look here. The issue is that there is a difference in speed calling the C vs normal numpy api, and there are some cases where the C API is less appropriate. Previously we used aliasing which was unclear, but we just need to run the benchmarks to make sure there are no major performance regressions. The way to do this is https://github.com/MDAnalysis/mdanalysis/blob/develop/benchmarks/README.rst. Something like |
I imagine if anything performance will improve but we should check |
@hmacdope, I am getting an issue with asv.conf.json. In that file, it mentions using python 3.8 version. But in env/09b6664d368df460776d8e73bd3171a0/project/package/pyproject.toml it mentions to use python 3.9+ I ran the command The error
|
I changed the Python version in asv.conf.json to 3.9 to run the benchmark test. Can you explain what the results are? @hmacdope @RMeli |
There should be a little summary at the end that compares performance of the two runs. Try again without verbose? |
@hmacdope, I tried without verbose. But it was still without any summary. |
@Sumit112192 I will run benchmarks for you, sorry for delay. |
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.
The diff looks "ok" to me. The benchmark suite is currently broken because of gh-3519 when I check locally, and it looks like several other issues may be present as well.
FWIW, I'd probably just vote to merge it. The benchmark suite is a bit of a mess at the moment it seems. I'll see if I can re-run with the failing benchmarks skipped using a regex, but it is annoying to do. |
Similar thing to report, no performance regressions observed on my run. Benchmarks not all running at @tylerjereddy observed, but I am also pretty happy with the diff. I will approve. |
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.
Just changelog.
Also @Sumit112192 is this your first contribution? If so add yourself to AUTHORS. |
@hmacdope I force-pushed the latest commit in which I updated the CHANGELOG and AUTHORS files. Is there any issue with the force commit? |
@hmacdope I read that force pushing can be dangerous as it deletes other commit history. How can I delete my above force push? Or should I create another pull request using normal push? |
The diff looks fine to me. no easy way to fix a force push but it's OK, your PR will all be squashed into one commit. No need to stress. We can continue here on this PR |
@hmacdope relieved to hear that it is not a big issue. Also, I would like to work on the benchmark issue thing. How to get started on it? Any literature, I can follow to learn more about it? |
That closed thing happened by mistake. Sorry for that. |
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.
Just the newest first change, might have got lost in the force push, but if you could just make the change again should be good to go.
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.
Great work @Sumit112192! Super happy that you managed to improve our cimport
consistency. Has been needed for a while. :) I will wait for @tylerjereddy to also approve, then good to roll.
I squash-merged per MDA convention (I think), thanks! Only two files had changed since my positive review, and they were just author/changelog things. I doubt there will be any performance surprises, but hopefully our benchmarks are in better shape soon. |
Fixes #3908
Changes made in this Pull Request:
cimport numpy
fromnp
tocnp
PR Checklist
Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4346.org.readthedocs.build/en/4346/