Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't transform bound inputs to list for remote entities #3168

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

pvditt
Copy link
Contributor

@pvditt pvditt commented Mar 4, 2025

ref: https://linear.app/unionai/issue/BB-2662/update-sdk-to-support-bound-inputs-for-mapping-over-launch-plans

Why are the changes needed?

cleaning up adding support for bound inputs for mapping over remote launch plans. Works E2E without this change but figured we should still clean this up

What changes were proposed in this pull request?

don't transform bound inputs to list

How was this patch tested?

added unit test

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 PR enhances the transform_interface_to_list function to accept a bound_inputs parameter, preventing fixed inputs from being transformed into lists. The changes include modifications to core interface logic, documentation updates, and adjustments to remote execution handling to maintain scalar inputs.

Unit tests added: True

Estimated effort to review (1-5, lower is better): 1

@flyte-bot
Copy link
Contributor

Code Review Agent Run Status

  • Limitations and other issues: ❌ Failure - The AI Code Review Agent skipped reviewing this change because it is configured to exclude certain pull requests based on the source/target branch or the pull request status. You can change the settings here, or contact the agent instance creator at [email protected].

Copy link

codecov bot commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.32%. Comparing base (1b35b09) to head (5ef49bc).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
flytekit/remote/remote.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3168      +/-   ##
==========================================
+ Coverage   76.58%   79.32%   +2.73%     
==========================================
  Files         212      339     +127     
  Lines       22034    28031    +5997     
  Branches     2864     2877      +13     
==========================================
+ Hits        16875    22235    +5360     
- Misses       4367     5000     +633     
- Partials      792      796       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Paul Dittamo <[email protected]>
@pvditt pvditt requested a review from Future-Outlier March 4, 2025 06:19
@pvditt pvditt mentioned this pull request Mar 4, 2025
3 tasks
@flyte-bot
Copy link
Contributor

flyte-bot commented Mar 4, 2025

Code Review Agent Run #a0b6e8

Actionable Suggestions - 1
  • flytekit/models/interface.py - 1
    • Consider default value for backward compatibility · Line 161-161
Review Details
  • Files reviewed - 5 · Commit Range: 5ef49bc..9716b7a
    • flytekit/core/array_node.py
    • flytekit/core/interface.py
    • flytekit/models/interface.py
    • flytekit/remote/remote.py
    • tests/flytekit/unit/models/test_interface.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

AI Code Review powered by Bito Logo

@flyte-bot
Copy link
Contributor

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Feature Improvement - Bound Inputs Handling Improvement

array_node.py - Updated call to transform_interface_to_list by passing self.bound_inputs to preserve scalar behavior for fixed inputs.

interface.py - Revised documentation string to clarify that bound inputs are maintained as is, avoiding list conversion.

interface.py - Modified transform_interface_to_list signature and implementation to accept a set of bound_inputs and conditionally transform inputs.

remote.py - Changed invocation of transform_interface_to_list by explicitly passing an empty set for bound_inputs to ensure proper remote execution.

Testing - Unit Test Updates for Bound Inputs

test_interface.py - Updated unit tests to pass appropriate bound_inputs parameters and verify that inputs and outputs are correctly processed based on new behavior.

@pvditt pvditt requested a review from thomasjpfan March 4, 2025 17:54
@pvditt pvditt merged commit 15cc1b6 into master Mar 4, 2025
111 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants