Skip to content

Commit

Permalink
updated formatting of tasks.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
ap0calypse8 committed Oct 30, 2024
1 parent 56afdfc commit 4e64e04
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/user_guide/concepts/main_concepts/tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,26 +133,26 @@ Tasks can define a retry strategy to handle different types of failures:
- Network issues
- Service unavailability
- Hardware failures

*Important*: When running on spot/interruptible instances, preemptions count against the system retry budget, not the user retry budget. The last retry attempt automatically runs on a non-preemptible instance to ensure task completion.

2. **User Retries**: Specified in the `@task` decorator (via `retries` parameter), used for:
*Important*: When running on spot/interruptible instances, preemptions count against the system retry budget, not the user retry budget. The last retry attempt automatically runs on a non-preemptible instance to ensure task completion.

2. **User Retries**: Specified in the ``@task`` decorator (via ``retries`` parameter), used for:
- Application-level errors
- Invalid input handling
- Business logic failures

```python
@task(retries=3) # Sets user retry budget to 3
def my_task() -> None:
...
```
.. code-block:: python
@task(retries=3) # Sets user retry budget to 3
def my_task() -> None:
...
### Alternative Retry Behavior

Starting with from 1.10.0, Flyte offers a simplified retry behavior where both system and user retries count towards a single retry budget defined in the task decorator. To enable this:
Starting from 1.10.0, Flyte offers a simplified retry behavior where both system and user retries count towards a single retry budget defined in the task decorator. To enable this:

1. Set `configmap.core.propeller.node-config.ignore-retry-cause` to `true` in helm values
1. Set ``configmap.core.propeller.node-config.ignore-retry-cause`` to ``true`` in helm values
2. Define retries in the task decorator to set the total retry budget
3. The last retries will automatically run on non-spot instances

This provides a simpler, more predictable retry behavior while maintaining reliability.
This provides a simpler, more predictable retry behavior while maintaining reliability.

0 comments on commit 4e64e04

Please sign in to comment.