-
Notifications
You must be signed in to change notification settings - Fork 796
KEP-2401: Complement torch plugin to support torchtune config mutation #2587
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
KEP-2401: Complement torch plugin to support torchtune config mutation #2587
Conversation
… plugin. Signed-off-by: Electronic-Waste <[email protected]>
Signed-off-by: Electronic-Waste <[email protected]>
Signed-off-by: Electronic-Waste <[email protected]>
@Electronic-Waste: GitHub didn't allow me to request PR reviews from the following users: saileshd1402. Note that only kubeflow members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: Electronic-Waste <[email protected]>
… Args. Signed-off-by: Electronic-Waste <[email protected]>
Signed-off-by: Electronic-Waste <[email protected]>
Signed-off-by: Electronic-Waste <[email protected]>
4865ba0
to
06b555d
Compare
Signed-off-by: Electronic-Waste <[email protected]>
Signed-off-by: Electronic-Waste <[email protected]>
Pull Request Test Coverage Report for Build 14692575862Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Signed-off-by: Electronic-Waste <[email protected]>
Signed-off-by: Electronic-Waste <[email protected]>
PTAL if you have time, thanks:) /assign @kubeflow/wg-training-leads @astefanutti @akshaychitneni @franciscojavierarceo @deepanker13 |
Signed-off-by: Electronic-Waste <[email protected]>
Signed-off-by: Electronic-Waste <[email protected]>
Signed-off-by: Electronic-Waste <[email protected]>
Signed-off-by: Electronic-Waste <[email protected]>
Signed-off-by: Electronic-Waste <[email protected]>
Signed-off-by: Electronic-Waste <[email protected]>
@andreyvelich Thanks for your detailed review! I've addressed your comments. PTAL if you have time:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall lgtm.
Just small comment.
/lgtm
/assign @tenzen-y @kubeflow/wg-training-leads @saileshd1402 @astefanutti @franciscojavierarceo for the review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, we can move forward.
Let's address any additional changes in the followup PRs.
Thank you for this @Electronic-Waste!
/approve
[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 |
@andreyvelich @astefanutti Thanks for your detailed review! I'll create another issue to discuss about: #2587 (comment). |
kubeflow/trainer#2587) * chore(plugin): Add torchtune-related constants & update current torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add EnforceMLPolicy for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add UTs in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): fix error in torch plugin UTs. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Choose recipe according to numNodes & numProcPerNode & Args. Signed-off-by: Electronic-Waste <[email protected]> * chore(sdk): Add PretrainedModel enum type. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add torchtune config arg. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): add UT for single-device full fine-tuning with torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): Add test for multi-nodes full fine-tuning with torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): Update torch validate UTs. Signed-off-by: Electronic-Waste <[email protected]> * fix(lint): fix lint error. Signed-off-by: Electronic-Waste <[email protected]> * fix(sdk): remove pretrained model enum type in sdk. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): retrieve model name from runtimeRef. Signed-off-by: Electronic-Waste <[email protected]> * fix(lint): fix typo. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): make some adjustments according to the review. Signed-off-by: Electronic-Waste <[email protected]> * fix(sdk): remove runtime in get_trainer_crd_from_builtin_trainer. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): pass PET_ env variables in torch plugin for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): add env validation for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): update comments. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugins): fix the implementation according to the review. Signed-off-by: Electronic-Waste <[email protected]> * test(plugins): fix UT error in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * fix: fix UT and e2e tests error. Signed-off-by: Electronic-Waste <[email protected]> * fix: remove debug info. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): add args in UTs related to torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): update torchtune related args. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): Add a UT for multi-node mode check in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> --------- Signed-off-by: Electronic-Waste <[email protected]>
kubeflow/trainer#2587) * chore(plugin): Add torchtune-related constants & update current torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add EnforceMLPolicy for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add UTs in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): fix error in torch plugin UTs. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Choose recipe according to numNodes & numProcPerNode & Args. Signed-off-by: Electronic-Waste <[email protected]> * chore(sdk): Add PretrainedModel enum type. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add torchtune config arg. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): add UT for single-device full fine-tuning with torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): Add test for multi-nodes full fine-tuning with torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): Update torch validate UTs. Signed-off-by: Electronic-Waste <[email protected]> * fix(lint): fix lint error. Signed-off-by: Electronic-Waste <[email protected]> * fix(sdk): remove pretrained model enum type in sdk. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): retrieve model name from runtimeRef. Signed-off-by: Electronic-Waste <[email protected]> * fix(lint): fix typo. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): make some adjustments according to the review. Signed-off-by: Electronic-Waste <[email protected]> * fix(sdk): remove runtime in get_trainer_crd_from_builtin_trainer. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): pass PET_ env variables in torch plugin for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): add env validation for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): update comments. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugins): fix the implementation according to the review. Signed-off-by: Electronic-Waste <[email protected]> * test(plugins): fix UT error in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * fix: fix UT and e2e tests error. Signed-off-by: Electronic-Waste <[email protected]> * fix: remove debug info. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): add args in UTs related to torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): update torchtune related args. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): Add a UT for multi-node mode check in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> --------- Signed-off-by: Electronic-Waste <[email protected]>
kubeflow/trainer#2587) * chore(plugin): Add torchtune-related constants & update current torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add EnforceMLPolicy for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add UTs in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): fix error in torch plugin UTs. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Choose recipe according to numNodes & numProcPerNode & Args. Signed-off-by: Electronic-Waste <[email protected]> * chore(sdk): Add PretrainedModel enum type. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add torchtune config arg. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): add UT for single-device full fine-tuning with torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): Add test for multi-nodes full fine-tuning with torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): Update torch validate UTs. Signed-off-by: Electronic-Waste <[email protected]> * fix(lint): fix lint error. Signed-off-by: Electronic-Waste <[email protected]> * fix(sdk): remove pretrained model enum type in sdk. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): retrieve model name from runtimeRef. Signed-off-by: Electronic-Waste <[email protected]> * fix(lint): fix typo. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): make some adjustments according to the review. Signed-off-by: Electronic-Waste <[email protected]> * fix(sdk): remove runtime in get_trainer_crd_from_builtin_trainer. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): pass PET_ env variables in torch plugin for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): add env validation for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): update comments. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugins): fix the implementation according to the review. Signed-off-by: Electronic-Waste <[email protected]> * test(plugins): fix UT error in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * fix: fix UT and e2e tests error. Signed-off-by: Electronic-Waste <[email protected]> * fix: remove debug info. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): add args in UTs related to torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): update torchtune related args. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): Add a UT for multi-node mode check in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> --------- Signed-off-by: Electronic-Waste <[email protected]>
kubeflow/trainer#2587) * chore(plugin): Add torchtune-related constants & update current torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add EnforceMLPolicy for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add UTs in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): fix error in torch plugin UTs. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Choose recipe according to numNodes & numProcPerNode & Args. Signed-off-by: Electronic-Waste <[email protected]> * chore(sdk): Add PretrainedModel enum type. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add torchtune config arg. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): add UT for single-device full fine-tuning with torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): Add test for multi-nodes full fine-tuning with torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): Update torch validate UTs. Signed-off-by: Electronic-Waste <[email protected]> * fix(lint): fix lint error. Signed-off-by: Electronic-Waste <[email protected]> * fix(sdk): remove pretrained model enum type in sdk. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): retrieve model name from runtimeRef. Signed-off-by: Electronic-Waste <[email protected]> * fix(lint): fix typo. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): make some adjustments according to the review. Signed-off-by: Electronic-Waste <[email protected]> * fix(sdk): remove runtime in get_trainer_crd_from_builtin_trainer. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): pass PET_ env variables in torch plugin for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): add env validation for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): update comments. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugins): fix the implementation according to the review. Signed-off-by: Electronic-Waste <[email protected]> * test(plugins): fix UT error in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * fix: fix UT and e2e tests error. Signed-off-by: Electronic-Waste <[email protected]> * fix: remove debug info. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): add args in UTs related to torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): update torchtune related args. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): Add a UT for multi-node mode check in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> --------- Signed-off-by: Electronic-Waste <[email protected]>
kubeflow#2587) * chore(plugin): Add torchtune-related constants & update current torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add EnforceMLPolicy for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add UTs in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): fix error in torch plugin UTs. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Choose recipe according to numNodes & numProcPerNode & Args. Signed-off-by: Electronic-Waste <[email protected]> * chore(sdk): Add PretrainedModel enum type. Signed-off-by: Electronic-Waste <[email protected]> * chore(plugin): Add torchtune config arg. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): add UT for single-device full fine-tuning with torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): Add test for multi-nodes full fine-tuning with torchtune. Signed-off-by: Electronic-Waste <[email protected]> * chore(test): Update torch validate UTs. Signed-off-by: Electronic-Waste <[email protected]> * fix(lint): fix lint error. Signed-off-by: Electronic-Waste <[email protected]> * fix(sdk): remove pretrained model enum type in sdk. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): retrieve model name from runtimeRef. Signed-off-by: Electronic-Waste <[email protected]> * fix(lint): fix typo. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): make some adjustments according to the review. Signed-off-by: Electronic-Waste <[email protected]> * fix(sdk): remove runtime in get_trainer_crd_from_builtin_trainer. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): pass PET_ env variables in torch plugin for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): add env validation for torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugin): update comments. Signed-off-by: Electronic-Waste <[email protected]> * fix(plugins): fix the implementation according to the review. Signed-off-by: Electronic-Waste <[email protected]> * test(plugins): fix UT error in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> * fix: fix UT and e2e tests error. Signed-off-by: Electronic-Waste <[email protected]> * fix: remove debug info. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): add args in UTs related to torchtune. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): update torchtune related args. Signed-off-by: Electronic-Waste <[email protected]> * fix(test): Add a UT for multi-node mode check in torch plugin. Signed-off-by: Electronic-Waste <[email protected]> --------- Signed-off-by: Electronic-Waste <[email protected]>
What this PR does / why we need it:
This PR adds the torchtune config mutation implementation in
torch
plugin.As we discussed before, we'll implement the config mutation/validation in server-side, so as to avoid frequent SDK changes and provide better backward compatibility for users.
In details, this PR:
.spec.trainer.args
EnforceMLPolicy
andValidate
functionREF: https://github.com/kubeflow/trainer/tree/master/docs/proposals/2401-llm-trainer-v2#complement-torch-plugin
/cc @kubeflow/wg-training-leads @astefanutti @franciscojavierarceo @saileshd1402 @deepanker13 @akshaychitneni
Which issue(s) this PR fixes (optional, in
Fixes #<issue number>, #<issue number>, ...
format, will close the issue(s) when PR gets merged):Fixes #2507 #2508
Checklist: