-
Notifications
You must be signed in to change notification settings - Fork 227
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
update: Re-enable commented code chunks in several notebooks #372
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
I see a couple of errors in the tests:
Is this happening because you're relying on some PL version?
This is likely because our mocks are returning generic results and not the type that you expect. This is the result that we're currently returning for this test (for all calls). Can you check if the result should be modified or new results added? |
@@ -1,400 +1,416 @@ | |||
{ |
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.
I'm not sure what we're showcasing here? It seems like the big addition here is the for loop around the AwsQuantumJob.create, and that seems like something we shouldn't need to show here.
Reply via ReviewNB
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.
I'll remove the code from this section that runs the multiple jobs - you're right, it's just demonstrating a for loop, there's nothing else new here.
examples/hybrid_jobs/7_Running_notebooks_as_hybrid_jobs/Running_notebooks_as_hybrid_jobs.ipynb
Show resolved
Hide resolved
@@ -22,17 +22,20 @@ | |||
"cell_type": "markdown", |
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.
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 optimization run for this problem is done on the LocalSimulator, so shrinking the problem cuts the local runtime roughly in half. Do you feel the demonstration is less valuable/understandable at the smaller size?
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.
Ah, surprised that it makes a big enough difference for the local simulator here between 4 and 6 qubits. Are you sure the time savings isn't coming from the fewer number of iterations?
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 number of iterations for this example is still 10 - it hasn't been changed here. The problem size is reduced by shrinking the number of nodes (from 6 to 4) and layers (from 4 to 2).
@@ -232,7 +232,7 @@ | |||
"outputs": [ |
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.
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.
I'll run this out to 25 iterations to make the convergence more obvious on the plot.
Hey, the example repo is frozen for the jobs decorator launch and this PR introduces conflicts with the feature branch (being merged today). I've reverted it in #414 and restored this branch |
Thanks, and sorry about that. I've copied the changes to a new branch |
Issue #, if available:
Description of changes:
Reduces runtime of commented code chunks and ensures that all code is uncommented in several example notebooks:
diff_method="device"
) to speed up by ~10x - new total runtime 2 min (down from 3 min)Note that despite uncommenting the code, this PR does not increase the runtime of the notebooks (because there are some corresponding reductions in problem size where appropriate).
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.