-
Notifications
You must be signed in to change notification settings - Fork 477
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
Multi task #112
Multi task #112
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
@googlebot I fixed it. |
1 similar comment
@googlebot I fixed it. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@@ -396,6 +402,94 @@ def _compute_logits_impl(self, context_features, example_features, labels, | |||
return logits | |||
|
|||
|
|||
class _MultiTaskGroupwiseRankingModel(_GroupwiseRankingModel): |
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.
This is a very nice proposal. Indeed, we had a proposal internally and have been working on some implementation. Your PR is a very good reference for us to build a polished version.
Since this touches the core code, we would like this to be as concise as possible. We will also have multiple small changes to achieve the goal of multi-task learning.
Stay tuned.
@fangkuann, I've updated the github with the multi-task support in tf-ranking. Please see the latest few commits here: https://github.com/tensorflow/ranking/commits/master. I also included a simple demo on how to use the multi-head in this commit: 1d91c5f. You may be able to adapt to your use case. The main design is to have logits and labels as dicts that map head names to Tensors. Please let us know if you find anything wrong. |
Closing this PR and let us know if you have other questions. |
@xuanhuiwang |
@fangkuann, let us know how your project goes and we are happy to provide more help. |
I work as a search engineer mainly focused on optimizing search result for our product, which is the largest question-answer community like Quora in China. Currently, we are trying several directions to further improve model performance,
|
@fangkuann, thanks a lot for your feedback. We are very glad to know that tf-ranking is used in your production! Re: multi-task. Thanks for sharing the results. MMOE sounds good for the next step. |
Thanks for your advice! |
support Multi-Task Learning using estimator.multi_head