8000 feat(trainer): Add support for param unpacking in the training function call by briangallagher · Pull Request #62 · kubeflow/sdk · GitHub
[go: up one dir, main page]

Skip to content

Conversation

briangallagher
Copy link
Contributor

What this PR does / why we need it:
Add support for param unpacking in the training function call.
Maintain backward compatibility and add a deprecation warning.

Fixes # 24

@coveralls
Copy link
coveralls commented Aug 11, 2025

Pull Request Test Coverage Report for Build 17513195086

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.9%) to 71.053%

Totals Coverage Status
Change from base Build 17487937699: 0.9%
Covered Lines: 297
Relevant Lines: 418

💛 - Coveralls

@briangallagher briangallagher changed the title Add support for param unpacking in the training function call feat(trainer): Add support for param unpacking in the training function call Aug 11, 2025
@astefanutti
Copy link
Contributor

/lgtm

Very nice!

Copy link
Contributor
@kramaranya kramaranya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @briangallagher!

@kramaranya
Copy link
Contributor

I think it would be great to include this in release 0.1, any thoughts? @briangallagher @andreyvelich @astefanutti

@andreyvelich
Copy link
Member

Yes, we should have this before 0.1 to avoid breaking changes.
@briangallagher Can you address the comments please ?

@kramaranya
Copy link
Contributor

/milestone v0.1

@google-oss-prow google-oss-prow bot added this to the v0.1 milestone Sep 1, 2025
@google-oss-prow google-oss-prow bot removed the lgtm label Sep 3, 2025
@briangallagher
Copy link
Contributor Author

@andreyvelich All outstanding comments should be addressed now.

@kramaranya
Copy link
Contributor

@briangallagher could you rebase the PR please?

@briangallagher
Copy link
Contributor Author

@andreyvelich I guess the e2e tests will now fail as the func_args are always unpacked.
Here is the PR to update the examples.
Regarding website changes, the getting started guide and user guides do not use func_args - so nothing to change here. Did you have other website changes in mind?

Copy link
Member
@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to manually merge this PR, since tests are failing.
@briangallagher Did you verify that your SDK changes are working ?

Copy link
Contributor
@kramaranya kramaranya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @briangallagher!
I just left a few nits

@briangallagher
Copy link
Contributor Author

We might need to manually merge this PR, since tests are failing. @briangallagher Did you verify that your SDK changes are working ?

Yes, tested and working

@andreyvelich
Copy link
Member

@briangallagher You might need to rebase this PR once more time

@briangallagher briangallagher force-pushed the dict-unpack branch 3 times, most recently from 4f2f25a to b6764b2 Compare September 5, 2025 19:03
Copy link
Member
@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this great contribution @briangallagher!
/lgtm
/assign @kramaranya @astefanutti @Electronic-Waste

Copy link
Member
@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small nit, we might need to update type and dostring for func_args here:

func_args (`Optional[Dict]`): The arguments to pass to the function.

Copy link
Member
@Electronic-Waste Electronic-Waste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@briangallagher Thanks for this!

/lgtm

Copy link
Contributor
@kramaranya kramaranya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks great! I just left one question

'apt-get install python-pip\n'
'fi\n\n'
'PIP_DISABLE_PIP_VERSION_CHECK=1 python -m pip install --quiet '
'PIP_DISABLE_PIP_VERSION_CHECK=1 python -m pip install --quiet '
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to do that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's require because of how the pip output is formatted here
The reason I have it in this PR is because these tests never actually ran on the previous PR i.e. utils_tests.py was never added to the test-python Make command so I don't think it ever worked.

I've updated this PR now to change the formatting of the "PIP..." output so these spaces are no longer required.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thank you!

Signed-off-by: Brian Gallagher <briangal@gmail.com>
@briangallagher
Copy link
Contributor Author

One small nit, we might need to update type and dostring for func_args here:

func_args (`Optional[Dict]`): The arguments to pass to the function.

fixed

Copy link
Member
@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @briangallagher!
/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label Sep 6, 2025
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kramaranya
Copy link
Contributor

Thank you @briangallagher!
/lgtm

@andreyvelich andreyvelich merged commit a16fe4d into kubeflow:main Sep 6, 2025
5 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0