Skip to content

Module: retry

RetryParams

Bases: BaseModel

Source code in src/infernet_ml/utils/retry.py
class RetryParams(BaseModel):
    model_config = ConfigDict(arbitrary_types_allowed=True)
    """
    Model for retry parameters
    """

    tries: Optional[int] = DEFAULT_TRIES
    delay: Optional[Union[int, float]] = DEFAULT_DELAY
    max_delay: Optional[Union[int, float]] = DEFAULT_MAX_DELAY
    backoff: Optional[Union[int, float]] = DEFAULT_BACKOFF
    jitter: Optional[Union[tuple[float, float], float]] = DEFAULT_JITTER
    exceptions: tuple[Type[Exception]] = (RetryableException,)

model_config = ConfigDict(arbitrary_types_allowed=True) class-attribute instance-attribute

Model for retry parameters