-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Remove psutil as a dependency #11336
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 7626767360Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
The test that fails is "test_handle_measurement" while performing SabreSwaps. I can reproduce the error, by setting QISKIT_NUM_PROCS=1. SabreSwap uses CPU_COUNT to determine the number of runs while evaluating the heuristic to optimize the circuit. The new method of finding the cpu count probably yields a different, platform-dependent result and therefore the heuristic returns another result. This raises the question, how this test case should be handled. If the reference circuit is not reached depending on system parameters, it is not a sensible test case, but hard overwriting the cpu count with two, just to make this case work seems equally nonsensical. How would you like to proceed? |
It's a bug in the test, we should be setting a fixed number of trials to ensure the test is deterministic. So I'd suggest ust hardcoding the trial count in the test. |
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.
Overall this LGTM, thanks for tackling this. I just had a few inline comments.
releasenotes/notes/psutil-dependancy-removed-bf5366f516d92378.yaml
Outdated
Show resolved
Hide resolved
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 for opening the PR. I just pushed up some small commits to update the tests and apply my inline suggestions to get this unblocked
Thanks a lot for approving my PR and for helping out with the small fixes! |
Summary
Removes any uses of psutil and the corresponding dependency
Details and comments
As described in issue #11254, psutil is used to detect the number of cores and memory to optimize resource allocation. The actual usefulness of those information is however questionable, while adding additional bloat. Therefore any references to the module were modified, the unit tests fixed and the dependency removed.
Fixes #11254