-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Ansor][AutoTVM v2.0] Phase 1: XGBoost Cost Model #6270
Conversation
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.
Should we make the XGBoost cost model as the default cost model?
gradient = x - y | ||
hessian = np.ones_like(gradient) | ||
|
||
if len(weight) == 0: |
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.
if len(weight) == 0: | |
if not weight: |
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.
weight
is an np.ndarray. We can not use if not weight
for an np.ndarray
36dea9a
to
e51fc04
Compare
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.
LGTM. Thanks.
* port xgb cost model * add xgboost cost model * fix lint * address comments * address comments * Fix
* port xgb cost model * add xgboost cost model * fix lint * address comments * address comments * Fix
* port xgb cost model * add xgboost cost model * fix lint * address comments * address comments * Fix
* port xgb cost model * add xgboost cost model * fix lint * address comments * address comments * Fix
* port xgb cost model * add xgboost cost model * fix lint * address comments * address comments * Fix
For the full upstream plan, see Ansor RFC.
This PR adds a xgboost-based cost model.
It is similar to the existing xgboost model in autotvm but works on the more general feature representation introduced by #6190 .
RMSE is used as the loss function, but the general feature representation needs slight modification to the loss function.
To support the new loss function, this PR implements a custom xgboost loss function "pack-sum-RMSE".
It is called "pack-sum" because we combine several samples into a "pack" and sum up their predictions.