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
Add unittests for updaters. #3836
Conversation
Note to myself, parameter |
880af40
to
01c388b
Compare
Codecov Report
@@ Coverage Diff @@
## master #3836 +/- ##
============================================
+ Coverage 52.05% 56.48% +4.42%
Complexity 203 203
============================================
Files 181 184 +3
Lines 14360 14502 +142
Branches 495 495
============================================
+ Hits 7475 8191 +716
+ Misses 6647 6073 -574
Partials 238 238
Continue to review full report at Codecov.
|
@trivialfis This is great! Let me know if you want me to review. |
@hcho3 I'm afraid there is not much I can do. It's very hard for me to come up with proper tests for these algorithms now. |
@trivialfis I can add some tests for fast_hist after 0.81 release. Can we hold a bit? |
@hcho3 That would be great. In the mean while can you help taking a look into these thing in this PR?
If you find these unsuitable, I can make changes early. |
@hcho3 If the testing framework for |
@trivialfis Okay, I will review this PR as it stands, so that we have a proper testing infrastructure in place. We can merge this PR after 0.81 release, which is set to happen on November 1, 2018. |
@hcho3 Thanks! |
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 architecture looks good to me. After this is merged, I will add more unit tests for FastHistMaker
after this is merged.
|
||
RealImpl::InitNewNode(0, gmat, row_gpairs, *(*dmat), tree); | ||
// Manipulate the root_gain so that I don't have to invent an actual | ||
// split. Yes, I'm cheating. |
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.
It's not "cheating." To me it looks like a legitimate form of testing.
Add unittest for prune. Add unittest for refresh. Refactor fast_hist. * Remove fast_hist_param. * Rename to quantile_hist. Add unittests for QuantileHist. * Refactor QuantileHist into .h and .cc file. * Remove sync.h. * Remove MGPU_mock test. Rename fast hist method to quantile hist. Address split index.
331c620
to
5bf2fc4
Compare
I will now go ahead and start working on adding unit tests for 'hist'. Thanks! |
This is to aid #3825. Without unittests it's very hard for me to do refactoring since I can't interpret errors in r-tests.