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

Multitask train modules 707 #708

Merged
merged 3 commits into from
May 3, 2024

Conversation

gabe-l-hart
Copy link
Collaborator

What this PR does / why we need it:

Closes #707

This PR updates the logic for how the ModuleClass.tasks property is implemented. The previous use of a set was there to ensure uniqueness. It also had the subtle implication that all tasks are equally important to a given ModuleClass since a set does not guarantee order.

This second implication, however, was not respected in the train API generation. Since a given ModuleClass can have only a single train method, the mapping from ModuleClass to task was nondeterministic for multitask module training. With this PR, the order of tasks is now strictly defined to be the unique concatenation of the list of tasks in the module itself with the task lists of all parent modules in MRO.

Special notes for your reviewer:

If applicable:

  • this PR contains documentation
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

…perty

The use of set was causing lots of problems since sets do not guarantee
consistent order. It was there to ensure uniqueness which we'll tackle in
the creation of _TASK_CLASSES directly.


caikit#707

Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
…roperty

caikit#707

Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Copy link
Collaborator

@evaline-ju evaline-ju left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@gkumbhat gkumbhat left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@gabe-l-hart gabe-l-hart merged commit 51593ad into caikit:main May 3, 2024
8 checks passed
@gabe-l-hart gabe-l-hart deleted the MultitaskTrainModules-707 branch May 3, 2024 19:36
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.

Training endpoints change with multitask module
3 participants