-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Log time for execute steps #3922
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.
Thanks @javabster , sorry for the slow review. This looks good so far. Few comments below.
time.time returns a time in seconds. Co-Authored-By: Kevin Krsulich <kevin@krsulich.net>
Change LOG to logger for consistency Co-Authored-By: Kevin Krsulich <kevin@krsulich.net>
log_output better than output Co-Authored-By: Kevin Krsulich <kevin@krsulich.net>
This reverts commit 86219c7.
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.
This is good to go, thanks for the addressing the comments!
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.
This LGTM, thanks for doing this. It's good to get more log messages being emitted to help in debugging. My only nit would be the unit choice of milliseconds especially for transpile()
since I'm used to working on the order of seconds or minutes for the things I'm normally doing. That being said I have a couple of small suggestions in the tests, but nothing worth blocking over and something easy enough to fix in a follow up PR.
@@ -696,6 +699,37 @@ def test_measure_doesnt_unroll_ms(self, optimization_level): | |||
self.assertEqual(qc, out) | |||
|
|||
|
|||
class StreamHandlerRaiseException(StreamHandler): |
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.
While this class is only 3 lines I feel like we should move it some where common to avoid having a copy in every place we're asserting log output.
Co-Authored-By: Matthew Treinish <mtreinish@kortar.org>
Co-Authored-By: Matthew Treinish <mtreinish@kortar.org>
Co-Authored-By: Matthew Treinish <mtreinish@kortar.org>
* Added logging for total transpile time * Added logging for total assembly time * Added total schedule time logging * Added total schedule time logging * Added logging for job submission and fixed linting errors * Fixed linting errors * Update qiskit/compiler/assemble.py time.time returns a time in seconds. Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/execute.py Change LOG to logger for consistency Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update test/python/basicaer/test_qasm_simulator.py log_output better than output Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Made updates to job submission based on PR comments * Fixed styling error * Fixed test error * Revert "Update qiskit/compiler/assemble.py " This reverts commit 86219c7. * Update test/python/compiler/test_transpiler.py Co-Authored-By: Matthew Treinish <mtreinish@kortar.org> * Update test/python/compiler/test_assembler.py Co-Authored-By: Matthew Treinish <mtreinish@kortar.org> * Update test/python/basicaer/test_qasm_simulator.py Co-Authored-By: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Kevin Krsulich <kevin@krsulich.net> Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com> Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Summary
This PR fixes issue #3805
I've added logging for Total Transpile Time, Total Schedule Time, Total Assembly Time and backend job submission. Am happy to add more if there are further suggestions. Have added tests where possible, although sometimes was unsure of which file was the best place to put the tests (I'm still relatively new to Qiskit contributions).
Details and comments