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
It's difficult to diagnose and handle errors of this nature in Python as the QCS SDK is currently structured. I advocate consideration for the following:
Supporting retry configuration on all gRPC calls - translation, execution (ie submit), and result retrieval retrieve_results. This should support retry based on gRPC status code as well as a backoff strategy - linear, exponential, max retries, etc.
Surfacing gRPC exceptions to Python in a structured way. At a minimum, this should include the status code. Request id and timing data would also be nice.
A persistent handle to the gRPC channel. The way the client is currently structured, each call to translate, execute, and retrieve results instantiates a new channel (see for instance
If these options present inordinate technical challenges, I wonder if an alternative approach would be to interface with existing Python gRPC tooling - as in expose functions that convert Python based gRPC message objects to QCS SDK structs.
The text was updated successfully, but these errors were encountered:
erichulburd
changed the title
Improve handling of retryable error
Improve handling of gRPC failures
May 14, 2024
Over the past few months, I've seen a variety of different gRPC status failures that should be retryable on the client side. A most recent example:
It's difficult to diagnose and handle errors of this nature in Python as the QCS SDK is currently structured. I advocate consideration for the following:
submit
), and result retrievalretrieve_results
. This should support retry based on gRPC status code as well as a backoff strategy - linear, exponential, max retries, etc.qcs-sdk-rust/crates/lib/src/qpu/api.rs
Line 292 in e73f83d
once_cell
utilities: https://docs.rs/once_cell/latest/once_cell/sync/struct.Lazy.html.If these options present inordinate technical challenges, I wonder if an alternative approach would be to interface with existing Python gRPC tooling - as in expose functions that convert Python based gRPC message objects to QCS SDK structs.
The text was updated successfully, but these errors were encountered: