Skip to content

Commit

Permalink
add maptask cache clarification (#5340)
Browse files Browse the repository at this point in the history
* add maptask cache clarification

Signed-off-by: Daniel Sola <[email protected]>

* grammar

Signed-off-by: Daniel Sola <[email protected]>

* Update docs/user_guide/advanced_composition/map_tasks.md

Co-authored-by: Nikki Everett <[email protected]>
Signed-off-by: Daniel Sola <[email protected]>

---------

Signed-off-by: Daniel Sola <[email protected]>
Signed-off-by: Daniel Sola <[email protected]>
Co-authored-by: Nikki Everett <[email protected]>
  • Loading branch information
dansola and neverett authored May 9, 2024
1 parent aa1f211 commit c0f5b10
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/user_guide/advanced_composition/map_tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def map_workflow_with_metadata(data: list[int] = [10, 12, 11, 10, 13, 12, 100, 1
data_point=data
)
```
When `cache` and `cache_version` are used in `TaskMetadata` for a map task, the cache hits occur on individual tasks being mapped over, rather than the parent map task operation. This means that if one input item in a list changes, each previously executed task is read from cache and only the task for the changed item is actually executed, rather than the task being re-executed for every item. Note that this has the same effect as adding `cache` and `cache_version` in the `@task` decorator for a task being mapped over.

You can also configure `concurrency` and `min_success_ratio` for a map task:
- `concurrency` limits the number of mapped tasks that can run in parallel to the specified batch size.
Expand Down

0 comments on commit c0f5b10

Please sign in to comment.