From b522f16a9091ee75b5cb6c83c2327358040f5208 Mon Sep 17 00:00:00 2001 From: LunarMarathon Date: Wed, 4 Oct 2023 20:43:09 +0530 Subject: [PATCH 1/2] Updated to curr v of req resources Signed-off-by: LunarMarathon --- tests/flytekit/unit/core/test_map_task.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/flytekit/unit/core/test_map_task.py b/tests/flytekit/unit/core/test_map_task.py index 48910e2444..9b5c5b2200 100644 --- a/tests/flytekit/unit/core/test_map_task.py +++ b/tests/flytekit/unit/core/test_map_task.py @@ -1,6 +1,7 @@ import functools import typing from collections import OrderedDict +from flytekit.core.resources import Resources import pytest @@ -53,7 +54,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 From f0570ed3a073af308310eea10b4d04639f9679e3 Mon Sep 17 00:00:00 2001 From: LunarMarathon Date: Thu, 5 Oct 2023 15:42:01 +0530 Subject: [PATCH 2/2] Sort the imports Signed-off-by: LunarMarathon --- tests/flytekit/unit/core/test_map_task.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/flytekit/unit/core/test_map_task.py b/tests/flytekit/unit/core/test_map_task.py index 9b5c5b2200..f66ab7bd49 100644 --- a/tests/flytekit/unit/core/test_map_task.py +++ b/tests/flytekit/unit/core/test_map_task.py @@ -1,12 +1,11 @@ import functools import typing from collections import OrderedDict -from flytekit.core.resources import Resources 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