Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex AI Studio
    • About Yandex AI Studio
    • Yandex Workflows
    • Quotas and limits
    • Terms and definitions
  • Compatibility with OpenAI
    • About Yandex Cloud ML SDK
      • Overview
      • Authentication
      • Request retries
  • Access management
  • Pricing policy
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Retries configuration
  • class yandex_cloud_ml_sdk._retry.RetryPolicy
  • Interceptors impletentation
  • class yandex_cloud_ml_sdk._retry.UnaryUnaryRetryInterceptor
  • class yandex_cloud_ml_sdk._retry.UnaryStreamRetryInterceptor
  1. Yandex Cloud ML SDK
  2. SDK reference
  3. Request retries

Request retries

Written by
Yandex Cloud
Updated at August 25, 2025
  • Retries configuration
    • class yandex_cloud_ml_sdk._retry.RetryPolicy
  • Interceptors impletentation
    • class yandex_cloud_ml_sdk._retry.UnaryUnaryRetryInterceptor
    • class yandex_cloud_ml_sdk._retry.UnaryStreamRetryInterceptor

Some general info about how retries works

Retries configurationRetries configuration

class yandexcloudmlsdk.retry.RetryPolicyclass yandex_cloud_ml_sdk._retry.RetryPolicy

A class that defines a retry policy for network operations.

max_attempts: int = 5

the maximum number of retry attempts

initial_backoff: float = 1

the initial backoff time (in seconds)

max_backoff: float = 10

the maximum backoff time (in seconds)

backoff_multiplier: float = 1.5

the multiplier applied to the backoff after each attempt

jitter: float = 1

the maximum amount of jitter to add to the backoff

retriable_codes: Iterable[StatusCode] = (StatusCode.UNAVAILABLE, StatusCode.RESOURCE_EXHAUSTED)

the grpc status codes that are considered retriable

get_interceptors()

Return type

tuple[ClientInterceptor, …]

async sleep(attempt, deadline)

Parameters

  • attempt (int)
  • deadline (float | None)

Return type

None

Interceptors impletentationInterceptors impletentation

class yandexcloudmlsdk.retry.UnaryUnaryRetryInterceptorclass yandex_cloud_ml_sdk._retry.UnaryUnaryRetryInterceptor

class yandexcloudmlsdk.retry.UnaryStreamRetryInterceptorclass yandex_cloud_ml_sdk._retry.UnaryStreamRetryInterceptor

Was the article helpful?

Previous
Batch
Next
Overview
© 2025 Direct Cursus Technology L.L.C.