Skip to content

Commit 7027196

Browse files
committed
Document retry duration
1 parent f7294d1 commit 7027196

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

docs/docs/concepts/dev-environments.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,10 @@ retry:
458458

459459
</div>
460460

461+
!!! info "Retry duration"
462+
The duration period is calculated as a run age for `no-capacity` event
463+
and as a time passed since the last `interruption` and `error` for `interruption` and `error` events..
464+
461465
### Inactivity duration
462466

463467
Set [`inactivity_duration`](../reference/dstack.yml/dev-environment.md#inactivity_duration)

docs/docs/concepts/services.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,9 @@ retry:
821821
If one replica of a multi-replica service fails with retry enabled,
822822
`dstack` will resubmit only the failed replica while keeping active replicas running.
823823

824+
!!! info "Retry duration"
825+
The duration period is calculated as a run age for `no-capacity` event and as a time passed since the last `interruption` and `error` for `interruption` and `error` events..
826+
824827
### Spot policy
825828

826829
By default, `dstack` uses on-demand instances. However, you can change that

docs/docs/concepts/tasks.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@ retry:
718718
If one job of a multi-node task fails with retry enabled,
719719
`dstack` will stop all the jobs and resubmit the run.
720720

721+
!!! info "Retry duration"
722+
The duration period is calculated as a run age for `no-capacity` event and as a time passed since the last `interruption` and `error` for `interruption` and `error` events..
723+
721724
### Priority
722725

723726
Be default, submitted runs are scheduled in the order they were submitted.

src/dstack/_internal/core/models/profiles.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,13 @@ class ProfileRetry(generate_dual_core_model(ProfileRetryConfig)):
146146
] = None
147147
duration: Annotated[
148148
Optional[int],
149-
Field(description="The maximum period of retrying the run, e.g., `4h` or `1d`"),
149+
Field(
150+
description=(
151+
"The maximum period of retrying the run, e.g., `4h` or `1d`."
152+
" The period is calculated as a run age for `no-capacity` event"
153+
" and as a time passed since the last `interruption` and `error` for `interruption` and `error` events."
154+
)
155+
),
150156
] = None
151157

152158
_validate_duration = validator("duration", pre=True, allow_reuse=True)(parse_duration)

0 commit comments

Comments
 (0)