You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The run() call blocks until the job is complete. This blocks me from being able to submit more jobs in the same session in batch mode.
Steps to reproduce
See above.
Expected behavior
Sampler.run() should return once I've submitted the job and not block waiting for the backend to be determined once the first job in the session is complete.
Describe the bug
Using the ibm_cloud channel, I create a Session without a backend specified to let the server pick the backend.
I run a Sampler job using:
The
run()
call blocks until the job is complete. This blocks me from being able to submit more jobs in the same session in batch mode.Steps to reproduce
See above.
Expected behavior
Sampler.run()
should return once I've submitted the job and not block waiting for the backend to be determined once the first job in the session is complete.Suggested solutions
I believe the relevant code is here:
https://github.com/Qiskit/qiskit-ibm-runtime/blob/0.12.2/qiskit_ibm_runtime/session.py#L178
That
job.backend()
call is blocking when no backend is specified when creating the session:https://github.com/Qiskit/qiskit-ibm-runtime/blob/0.12.2/qiskit_ibm_runtime/runtime_job.py#L258-L259
Maybe pass a
timeout
value of 0 and handleRuntimeJobTimeoutError
and just leave backend unset in the Session instance?Additional Information
The text was updated successfully, but these errors were encountered: