<#6322 upstream bound inputs support> Pull request...
# flyte-github
c
#6322 upstream bound inputs support Pull request opened by pvditt ## Tracking issue fixes: https://linear.app/unionai/issue/BB-3499/cannot-pass-arguments-of-type-list-to-a-partial-function-that-will-be fixes: #4325 Related: flyteorg/flytekit#3185 + flyteorg/flytekit#3187 ## Why are the changes needed? Add list support for mapping over partials ## What changes were proposed in this pull request? Upstream some of the bound inputs support for private fork. ArrayNode handler now has context to determine which inputs are bound. ## How was this patch tested?
Copy code
from flytekit import map_task, task, workflow

import functools
import typing


@task
def demo_task(strings: typing.List[str], num: int) -> str:
    return f"{num}".join(strings)


@workflow
def demo_wf(strings: typing.List[str] = ["a", "b", "c"], nums: typing.List[int] = [1, 2]) -> None:
    map_task(functools.partial(demo_task, strings=strings))(num=nums)
[image](https://private-user-images.githubusercontent.com/37558497/421569112-b80fc3da-35bd-4fd7-abce-4eb4b0b11507.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDE3OTczMTgsIm5iZiI6MTc0MTc5NzAxOCwicGF0aCI6Ii8zNzU1ODQ5Ny80MjE1NjkxMTItYjgwZmMzZGEtMzViZC00ZmQ3LWFiY2UtNGViNGIwYjExNTA3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzEyVDE2MzAxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkMTBkYzU5MzFhZjM5MzgwNmZhYmQwYzE3NjhhYmQyY2I3NmM1M2VjYmNkN2Y3YjgwN2RkOTVkZDhhM2Y4Y2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.oEmxIY3cxTepPp1YpCzeRMj8SbHUe7NdDQJz4xQO_fs) ### Setup process ### Screenshots ## Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. ## Related PRs ## Docs link ### Summary by Bito This pull request introduces support for bound inputs in array nodes by adding a new GetBoundInputs API method and corresponding field for tracking bound inputs in array node specifications. The changes encompass API modifications, internal transformation logic updates, and handler implementation adjustments, with comprehensive test coverage for the new functionality. Unit tests added: True Estimated effort to review (1-5, lower is better): 3 flyteorg/flyte