-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Decouple Boosting Types (fixes #3128) #4827
Conversation
…(Normal Bagging has not been abstracted, so do NOT use it now)
…s in GBDT are still kept
|
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.
Thanks for your interest in LightGBM, and for this proposal!
The description of the desired behavior makes sense to me at a high level, but I think this deserves more discussion before proceeding with the work involved in updating and reviewing this pull request (note that right now these changes cause the Python tests to segfault).
I'm going to mark this "in progress", and wait to review the code changes until other maintainers (especially @shiyu1994) have a chance to comment on whether they support the overall idea of this pull request.
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.
Leave a few comments for now. I'll spend more time looking into this later today. Thanks for your contribution.
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.
Thanks a lot for getting back to this PR!
I don't have any additional comments. LGTM for Python tests.
@shiyu1994 is this PR ready to merge? |
@microsoft-github-policy-service agree<br/><br/><br/><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="imail_signature" class="ntes-signature"> <a href="https://dashi.163.com/projects/signature-manager/detail/index.html?ftlId=1&name=yiff&uid=yiff%40mail.ustc.edu.cn&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyelogo%2FdefaultAvatar.png&email=%E9%82%AE%E7%AE%B1%EF%BC%9Ayiff%40mail.ustc.edu.cn&items=%5B%22%E9%82%AE%E7%AE%B1%EF%BC%9Ayiff%40mail.ustc.edu.cn%22%5D&logoUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyeicon%2F7ed06fe6e7c0cf2db4ee0363fad699b6.png" style="display:block;background:#fff; max-width: 400px; _width: 400px;padding:15px 0 10px 0;text-decoration: none; outline:none;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;">
<table cellpadding="0" style='width: 100%; max-width: 100%; table-layout: fixed; border-collapse: collapse;color: #9b9ea1;font-size: 14px;line-height:1.3;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;'>
<tbody style="font-family: 'PingFang SC', 'Hiragino Sans GB','WenQuanYi Micro Hei', 'Microsoft Yahei', '微软雅黑', verdana !important; word-wrap:break-word; word-break:break-all;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;">
<tr>
<td width="38" style="padding:0; box-sizing: border-box; width: 38px;">
<img width="38" height="38" style="vertical-align:middle; width: 38px; height: 38px; border-radius:50%;" src="https://mail-online.nosdn.127.net/qiyelogo/defaultAvatar.png" />
</td>
<td style='padding: 0 30px 0 10px; color: #31353b;'>
<div style="font-size: 16px;font-weight:bold; width:100%; white-space: nowrap; overflow:hidden;text-overflow: ellipsis;">yiff</div>
</td>
<td width="72" style="text-align:right; width: 72px;">
<img width="72" height="20" style="width: 72px; height: 20px;" src="https://mail-online.nosdn.127.net/qiyelogo/7ed06fe6e7c0cf2db4ee0363fad699b6.png" />
</td>
</tr>
<tr width="100%" style="font-size: 14px !important; width: 100%;">
<td colspan='3' style="padding:10px 0 0 0; font-size:14px !important; width: 100%;">
<div style="width: 100%;font-size: 14px ***@***.***</div>
</td>
</tr>
</tbody>
</table>
</a></div><br/><br/><br/><div class="ntes-mailmaster-quote" style="padding-top: 1px; padding-bottom: 1px" >
<div style=" margin-top: 20px; margin-bottom: 12px; font-size: 14px; line-height: 1.25; color: #89898c; " >---- Replied Message ----</div>
<div style=" margin-bottom: 12px; font-size: 13px; line-height: 1.25; color: #2c2c2e; padding: 2px; border-radius: 8px; background-color: #f0f0f0; " >
<table width="100%" cellpadding="0" cellspacing="10" border="0">
<tr>
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; white-space: nowrap; " >From</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " ><a class="mail-from" style="color: #1c83eb; text-decoration: none" ***@***.***" >***@***.***></a></td>
</tr>
<tr>
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; white-space: nowrap; " >Date</td>
<td class="mail-date" valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " >12/13/2022 12:18</td>
</tr>
<tr style="">
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; " >To</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " ><a class="mail-to" style="color: #1c83eb; text-decoration: none" ***@***.***" >***@***.***></a></td>
</tr>
<tr style="">
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; " >Cc</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " ><a class="mail-cc" style="color: #1c83eb; text-decoration: none" ***@***.***" >Yifei ***@***.***></a>、<a class="mail-cc" style="color: #1c83eb; text-decoration: none" ***@***.***" >***@***.***></a></td>
</tr>
<tr>
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; " >Subject</td>
<td class="mail-subject" valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " >Re: [microsoft/LightGBM] Decouple Boosting Types (fixes #3128) (PR #4827)</td>
</tr>
</table>
</div>
<div><p></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lyf-00/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" ***@***.***</a> please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.</p>
<pre class="notranslate"><code ***@***.*** agree [company="{your company}"]
</code></pre>
<blockquote>
<p dir="auto">Options:</p>
<ul dir="auto">
<li>(default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.</li>
<li>(when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.</li>
</ul>
</blockquote>
<details>
<summary>Contributor License Agreement</summary>
<h3 dir="auto">Contribution License Agreement</h3>
<p dir="auto">This Contribution License Agreement (<strong>“Agreement”</strong>) is agreed to by the party signing below (<strong>“You”</strong>),<br>
and conveys certain license rights to Microsoft Corporation and its affiliates (“Microsoft”) for Your<br>
contributions to Microsoft open source projects. This Agreement is effective as of the latest signature<br>
date below.</p>
<ol dir="auto">
<li><strong>Definitions</strong>.<br>
<strong>“Code”</strong> means the computer software code, whether in human-readable or machine-executable form,<br>
that is delivered by You to Microsoft under this Agreement.<br>
<strong>“Project”</strong> means any of the projects owned or managed by Microsoft and offered under a license<br>
approved by the Open Source Initiative (<a href="http://www.opensource.org" rel="nofollow">www.opensource.org</a>).<br>
<strong>“Submit”</strong> is the act of uploading, submitting, transmitting, or distributing code or other content to any<br>
Project, including but not limited to communication on electronic mailing lists, source code control<br>
systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of<br>
discussing and improving that Project, but excluding communication that is conspicuously marked or<br>
otherwise designated in writing by You as “Not a Submission.”<br>
<strong>“Submission”</strong> means the Code and any other copyrightable material Submitted by You, including any<br>
associated comments and documentation.</li>
<li><strong>Your Submission</strong>. You must agree to the terms of this Agreement before making a Submission to any<br>
Project. This Agreement covers any and all Submissions that You, now or in the future (except as<br>
described in Section 4 below), Submit to any Project.</li>
<li><strong>Originality of Work</strong>. You represent that each of Your Submissions is entirely Your original work.<br>
Should You wish to Submit materials that are not Your original work, You may Submit them separately<br>
to the Project if You (a) retain all copyright and license information that was in the materials as You<br>
received them, (b) in the description accompanying Your Submission, include the phrase “Submission<br>
containing materials of a third party:” followed by the names of the third party and any licenses or other<br>
restrictions of which You are aware, and (c) follow any other instructions in the Project’s written<br>
guidelines concerning Submissions.</li>
<li><strong>Your Employer</strong>. References to “employer” in this Agreement include Your employer or anyone else<br>
for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your<br>
Submission is made in the course of Your work for an employer or Your employer has intellectual<br>
property rights in Your Submission by contract or applicable law, You must secure permission from Your<br>
employer to make the Submission before signing this Agreement. In that case, the term “You” in this<br>
Agreement will refer to You and the employer collectively. If You change employers in the future and<br>
desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement<br>
and secure permission from the new employer before Submitting those Submissions.</li>
<li><strong>Licenses</strong>.</li>
</ol>
<ul dir="auto">
<li><strong>Copyright License</strong>. You grant Microsoft, and those who receive the Submission directly or<br>
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the<br>
Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute<br>
the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third<br>
parties.</li>
<li><strong>Patent License</strong>. You grant Microsoft, and those who receive the Submission directly or<br>
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under<br>
Your patent claims that are necessarily infringed by the Submission or the combination of the<br>
Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and<br>
import or otherwise dispose of the Submission alone or with the Project.</li>
<li><strong>Other Rights Reserved</strong>. Each party reserves all rights not expressly granted in this Agreement.<br>
No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are<br>
granted by implication, exhaustion, estoppel or otherwise.</li>
</ul>
<ol start="6" dir="auto">
<li><strong>Representations and Warranties</strong>. You represent that You are legally entitled to grant the above<br>
licenses. You represent that each of Your Submissions is entirely Your original work (except as You may<br>
have disclosed under Section 3). You represent that You have secured permission from Your employer to<br>
make the Submission in cases where Your Submission is made in the course of Your work for Your<br>
employer or Your employer has intellectual property rights in Your Submission by contract or applicable<br>
law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You<br>
have the necessary authority to bind the listed employer to the obligations contained in this Agreement.<br>
You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS<br>
REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES<br>
EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS<br>
PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF<br>
NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.</li>
<li><strong>Notice to Microsoft</strong>. You agree to notify Microsoft in writing of any facts or circumstances of which<br>
You later become aware that would make Your representations in this Agreement inaccurate in any<br>
respect.</li>
<li><strong>Information about Submissions</strong>. You agree that contributions to Projects and information about<br>
contributions may be maintained indefinitely and disclosed publicly, including Your name and other<br>
information that You submit with Your Submission.</li>
<li><strong>Governing Law/Jurisdiction</strong>. This Agreement is governed by the laws of the State of Washington, and<br>
the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County,<br>
Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to<br>
exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all<br>
defenses of lack of personal jurisdiction and forum non-conveniens.</li>
<li><strong>Entire Agreement/Assignment</strong>. This Agreement is the entire agreement between the parties, and<br>
supersedes any and all prior agreements, understandings or communications, written or oral, between<br>
the parties relating to the subject matter hereof. This Agreement may be assigned by Microsoft.</li>
</ol>
</details>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="#4827 (comment)">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ANJVRXDASALXRLLKJBNC3LDWM72KNANCNFSM5I2CKCKA">unsubscribe</a>.<br />You are receiving this because you were mentioned.<img src="https://github.com/notifications/beacon/ANJVRXH4746YBAOO5I7IKMLWM72KNA5CNFSM5I2CKCKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOKBKLDIY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><microsoft/LightGBM/pull/4827/c1347727779</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#4827 (comment)",
"url": "#4827 (comment)",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
</div>
</div>
</body>
</html>
|
@microsoft-github-policy-service agree<br/><br/><br/><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="imail_signature" class="ntes-signature"> <a href="https://dashi.163.com/projects/signature-manager/detail/index.html?ftlId=1&name=yiff&uid=yiff%40mail.ustc.edu.cn&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyelogo%2FdefaultAvatar.png&email=%E9%82%AE%E7%AE%B1%EF%BC%9Ayiff%40mail.ustc.edu.cn&items=%5B%22%E9%82%AE%E7%AE%B1%EF%BC%9Ayiff%40mail.ustc.edu.cn%22%5D&logoUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyeicon%2F7ed06fe6e7c0cf2db4ee0363fad699b6.png" style="display:block;background:#fff; max-width: 400px; _width: 400px;padding:15px 0 10px 0;text-decoration: none; outline:none;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;">
<table cellpadding="0" style='width: 100%; max-width: 100%; table-layout: fixed; border-collapse: collapse;color: #9b9ea1;font-size: 14px;line-height:1.3;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;'>
<tbody style="font-family: 'PingFang SC', 'Hiragino Sans GB','WenQuanYi Micro Hei', 'Microsoft Yahei', '微软雅黑', verdana !important; word-wrap:break-word; word-break:break-all;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;">
<tr>
<td width="38" style="padding:0; box-sizing: border-box; width: 38px;">
<img width="38" height="38" style="vertical-align:middle; width: 38px; height: 38px; border-radius:50%;" src="https://mail-online.nosdn.127.net/qiyelogo/defaultAvatar.png" />
</td>
<td style='padding: 0 30px 0 10px; color: #31353b;'>
<div style="font-size: 16px;font-weight:bold; width:100%; white-space: nowrap; overflow:hidden;text-overflow: ellipsis;">yiff</div>
</td>
<td width="72" style="text-align:right; width: 72px;">
<img width="72" height="20" style="width: 72px; height: 20px;" src="https://mail-online.nosdn.127.net/qiyelogo/7ed06fe6e7c0cf2db4ee0363fad699b6.png" />
</td>
</tr>
<tr width="100%" style="font-size: 14px !important; width: 100%;">
<td colspan='3' style="padding:10px 0 0 0; font-size:14px !important; width: 100%;">
<div style="width: 100%;font-size: 14px ***@***.***</div>
</td>
</tr>
</tbody>
</table>
</a></div><br/><br/><br/><div class="ntes-mailmaster-quote" style="padding-top: 1px; padding-bottom: 1px" >
<div style=" margin-top: 20px; margin-bottom: 12px; font-size: 14px; line-height: 1.25; color: #89898c; " >---- Replied Message ----</div>
<div style=" margin-bottom: 12px; font-size: 13px; line-height: 1.25; color: #2c2c2e; padding: 2px; border-radius: 8px; background-color: #f0f0f0; " >
<table width="100%" cellpadding="0" cellspacing="10" border="0">
<tr>
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; white-space: nowrap; " >From</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " ><a class="mail-from" style="color: #1c83eb; text-decoration: none" ***@***.***" >***@***.***></a></td>
</tr>
<tr>
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; white-space: nowrap; " >Date</td>
<td class="mail-date" valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " >12/13/2022 12:26</td>
</tr>
<tr style="">
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; " >To</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " ><a class="mail-to" style="color: #1c83eb; text-decoration: none" ***@***.***" >***@***.***></a></td>
</tr>
<tr style="">
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; " >Cc</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " ><a class="mail-cc" style="color: #1c83eb; text-decoration: none" ***@***.***" >Yifei ***@***.***></a>、<a class="mail-cc" style="color: #1c83eb; text-decoration: none" ***@***.***" >***@***.***></a></td>
</tr>
<tr>
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; " >Subject</td>
<td class="mail-subject" valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " >Re: [microsoft/LightGBM] Decouple Boosting Types (fixes #3128) (PR #4827)</td>
</tr>
</table>
</div>
<div><p></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lyf-00/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" ***@***.***</a> the command you issued was incorrect. Please try again.</p>
<p dir="auto">Examples are:</p>
<pre class="notranslate"><code ***@***.*** agree
</code></pre>
<p dir="auto">and</p>
<pre class="notranslate"><code ***@***.*** agree company="your company"
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="#4827 (comment)">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ANJVRXDCODH2TG4PMBZVI43WM73IRANCNFSM5I2CKCKA">unsubscribe</a>.<br />You are receiving this because you were mentioned.<img src="https://github.com/notifications/beacon/ANJVRXBI3SEJZJBA7DLBKCTWM73IRA5CNFSM5I2CKCKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOKBKMFQY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><microsoft/LightGBM/pull/4827/c1347732163</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#4827 (comment)",
"url": "#4827 (comment)",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
</div>
</div>
</body>
</html>
|
@lyf-00 Extra characters are sent through email reply. So could you please issue the command through Github website when you have time? Thanks. |
@microsoft-github-policy-service agree |
wow!!! Thanks so much for coming back and finishing this @shiyu1994 ! I wish @guolinke had had a chance to review one more time, since the only approval on this was @StrikerRUS's from about 4 months ago and there were several commits pushed onto it after that. |
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
Fixes #3128.
Now
GOSS
andDART
are mutual exclusive in LightGBM. Because they are both subclass ofGBDT
, only one of them can be instantiated during running.However, GOSS is a data sampling strategy, DART is a tree weighting strategy, theoretically they can be set at the same time.
In this branch, we try to decouple
GOSS
andDART
by abstractingGOSS
as aDataSampleStrategy
, implemented as a new class.Also,
Bagging
inGBDT
is a data sampling strategy. So we implement bothBagging
andGOSS
as subclasses ofDataSampleStrategy
.