Skip to content

Commit

Permalink
add with_overrides
Browse files Browse the repository at this point in the history
Signed-off-by: Samhita Alla <[email protected]>
  • Loading branch information
samhita-alla committed Dec 29, 2021
1 parent 9e156bb commit 36a6897
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flytekit/core/map_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def _raw_execute(self, **kwargs) -> Any:

def map_task(task_function: PythonFunctionTask, concurrency: int = None, min_success_ratio: float = None, **kwargs):
"""
Use a map task for parallelizable tasks that are run across a List of an input type. A map task can be composed of
Use a map task for parallelizable tasks that run across a list of an input type. A map task can be composed of
any individual :py:class:`flytekit.PythonFunctionTask`.
Invoke a map task with arguments using the :py:class:`list` version of the expected input.
Expand All @@ -230,6 +230,11 @@ def map_task(task_function: PythonFunctionTask, concurrency: int = None, min_suc
all inputs are processed.
:param min_success_ratio: If specified, this determines the minimum fraction of total jobs which can complete
successfully before terminating this task and marking it successful.
``with_overrides`` on a map task can be used to set individual map task resource assigment.
.. code-block:: python
map_task(my_mappable_task)(...).with_overrides(requests=ResourceRequests(cpu="1", memory="300Mi"), retries=1)
"""
if not isinstance(task_function, PythonFunctionTask):
raise ValueError(
Expand Down

0 comments on commit 36a6897

Please sign in to comment.