-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add max_concurrent_jobs
to Engine.get_sampler()
.
#7442
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
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7442 +/- ##
==========================================
- Coverage 98.68% 98.68% -0.01%
==========================================
Files 1092 1092
Lines 96626 96635 +9
==========================================
+ Hits 95356 95361 +5
- Misses 1270 1274 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@dyates - please complete the CLA. We are not able to accept contributions without the CLA. |
Thanks Pavel. I just confirmed, internally, that I am part of the Google CLA. |
ProcessorSampler._concurrent_job_limiter is initialized with an integer max_concurrent_jobs hence we know that _concurrent_job_limiter.capacity can not be None (unlimited).
Adds `max_concurrent_jobs` to the utility function [Engine.get_sampler](https://github.com/dyates/Cirq/blob/b8ca4844ef80102aa83ace1093552f25c02b101a/cirq-google/cirq_google/engine/engine.py#L580) to allow setting the [same field in the `ProcessSampler`]((https://github.com/quantumlib/Cirq/blob/4c7e393eb9fcefcba0c3c509e32cc354197cf014/cirq-google/cirq_google/engine/processor_sampler.py#L37)). This field throttles the number concurrent jobs that are sent to the backend (via `run_batch`). --------- Co-authored-by: Pavol Juhas <juhas@google.com>
Adds
max_concurrent_jobs
to the utility function Engine.get_sampler to allow setting the same field in theProcessSampler
. This field throttles the number concurrent jobs that are sent to the backend (viarun_batch
).