Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1323 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 171 171
Lines 11564 11577 +13
Branches 1515 1517 +2
=========================================
+ Hits 11564 11577 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| aws_quantum_task_mock.return_value = task_mock | ||
|
|
||
| shots = [10, 20, 30] | ||
| device("arn:aws:braket:::device/quantum-simulator/amazon/sim").run_batch( |
There was a problem hiding this comment.
So, this doesn't use ProgramSets at all, right? It creates 3 separate single tasks?
The code doesn't touch the relevant lines so it's hard to tell from this change alone.
There was a problem hiding this comment.
This isn't just for program sets; you can run individual circuits with different shot counts now.
| max_parallel=1, | ||
| ) | ||
|
|
||
| normalize_mock.assert_called_once() |
There was a problem hiding this comment.
Not checking the result? What is this test validating?
There was a problem hiding this comment.
Just another sanity check that we're not multipying the shot vector across the tasks; this test might be redundant
| max_parallel=1, | ||
| ) | ||
|
|
||
| assert batch.size == len(shots) |
There was a problem hiding this comment.
Isn't this trivial from the test construction? What is this testing? The size method wasn't added in this PR, right?
There was a problem hiding this comment.
Yeah, it's pretty redundant; it's just a sanity check to ensure that the shot vector didn't screw up the batch size (for example, running each task len(shots) times)
|
|
||
|
|
||
| @patch("braket.aws.aws_quantum_task.AwsQuantumTask.create") | ||
| def test_retry_with_shot_sequence(mock_create): |
There was a problem hiding this comment.
This looks like it's testing retry instead of the new shots logic. Can you help me understand how these two processes interact?
There was a problem hiding this comment.
This is just to ensure that the retry uses the correct shot count for the retried task
Issue #, if available:
Description of changes:
Testing done:
Merge Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.