rslearn.utils.retry_session¶
retry_session ¶
Utility for creating requests sessions with retry logic.
create_retry_session ¶
create_retry_session(total_retries: int = 5, backoff_factor: float = 1.0, backoff_max: timedelta = timedelta(seconds=60)) -> Session
Create a requests session with retry logic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
total_retries
|
int
|
maximum number of retries |
5
|
backoff_factor
|
float
|
factor for exponential backoff |
1.0
|
backoff_max
|
timedelta
|
maximum backoff time |
timedelta(seconds=60)
|
Returns:
| Type | Description |
|---|---|
Session
|
configured requests session |