Skip to content
Pasqal Documentation

qek.shared.retrier

module
qek.shared.retrier

Backoff-and-retry utilities.

Classes

  • PygRetrier Our test harness attempts to run tests concurrently, but the pyg dataset loader does not work well with concurrency.

class
PygRetrier (max_attempts: int = 3, name: str = 'PygRetrier')

Our test harness attempts to run tests concurrently, but the pyg dataset loader does not work well with concurrency.

We work around this by simply retrying the loads a few times, until it succeeds.

Create a PygRetrier

Parameters

  • max_attempts : optional The max number of attempts to undertake before giving up. Defaults to 3.

  • name : optional A name to use during logging.

Methods

  • insist Attempt to call a function or constructor repeatedly until, hopefully, it works.

method
insist (callback: Type[Dataset], **kwargs: Any) → Dataset

Attempt to call a function or constructor repeatedly until, hopefully, it works.

Raises

  • exn