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

Use asyncio to parallelize notebook testing #1201

Merged
merged 5 commits into from
Apr 22, 2024
Merged

Use asyncio to parallelize notebook testing #1201

merged 5 commits into from
Apr 22, 2024

Conversation

Eric-Arellano
Copy link
Collaborator

@Eric-Arellano Eric-Arellano commented Apr 18, 2024

An alternative to #1181. This should help when executing many notebooks that submit jobs as they'll all submit their jobs immediately and begin queueing in parallel.

@frankharkins
Copy link
Member

frankharkins commented Apr 19, 2024

benchmark if actually faster

While interesting, I'd opt for readability / reliability over performance here. As long as the jobs are submitted immediately it should drastically help with the cron jobs. Same for the contention issue; I'm not too worried if we're not using CPU 100% efficiently, the main thing is getting the jobs out ASAP rather than in sequence.

To check, run with the --submit-jobs tab, then wait a few minutes and view https://quantum.ibm.com/jobs. If it's working you should see ~7 jobs queued, otherwise you should see 1 job. If you don't see any then you might need to change hub in the top-right corner. You can cancel the jobs from the web UI.

@frankharkins
Copy link
Member

This seems to be working correctly now; passes, warnings, and errors are all reported correctly, and the jobs are submitted asynchronously.

Screenshot 2024-04-22 at 14 01 58

@frankharkins frankharkins marked this pull request as ready for review April 22, 2024 13:10
@frankharkins frankharkins requested a review from arnaucasau April 22, 2024 13:11
@frankharkins frankharkins changed the title [wip] Use asyncio to parallelize notebook testing Use asyncio to parallelize notebook testing Apr 22, 2024
Copy link
Collaborator Author

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks

Copy link
Collaborator

@arnaucasau arnaucasau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! All looks good to me, I also tested the script locally, and worked well!

@Eric-Arellano Eric-Arellano added this pull request to the merge queue Apr 22, 2024
Merged via the queue into main with commit 3e2d5a5 Apr 22, 2024
2 checks passed
@Eric-Arellano Eric-Arellano deleted the EA/asyncio branch April 22, 2024 17:56
frankharkins added a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
An alternative to Qiskit#1181.
This should help when executing many notebooks that submit jobs as
they'll all submit their jobs immediately and begin queueing in
parallel.

---------

Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants