Skip to content

Commit

Permalink
[Docs]Updated examples for customizing resources (#1871)
Browse files Browse the repository at this point in the history
* Updated to curr v of req resources

Signed-off-by: LunarMarathon <[email protected]>

* Sort the imports

Signed-off-by: LunarMarathon <[email protected]>

---------

Signed-off-by: LunarMarathon <[email protected]>
  • Loading branch information
LunarMarathon authored Oct 9, 2023
1 parent c413570 commit 1f0d120
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/flytekit/unit/core/test_map_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

import flytekit.configuration
from flytekit import LaunchPlan, map_task
from flytekit import LaunchPlan, Resources, map_task
from flytekit.configuration import Image, ImageConfig
from flytekit.core.map_task import MapPythonTask, MapTaskResolver
from flytekit.core.task import TaskMetadata, task
Expand Down Expand Up @@ -53,7 +53,7 @@ def my_mappable_task(a: int) -> typing.Optional[str]:
def my_wf(x: typing.List[int]) -> typing.List[typing.Optional[str]]:
return map_task(my_mappable_task, metadata=TaskMetadata(retries=1), concurrency=10, min_success_ratio=0.75,)(
a=x
).with_overrides(cpu="10M")
).with_overrides(requests=Resources(cpu="10M"))

# test_map_task_end

Expand Down

0 comments on commit 1f0d120

Please sign in to comment.