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

Remove single_precision_histogram #7828

Merged
merged 5 commits into from
May 3, 2022
Merged

Conversation

RAMitchell
Copy link
Member

Removing the single_precision_histogram due to major observed accuracy issues. In particular many tests can fail due to numerical error accumulating in gain calculation, resulting in leaf nodes being opened that contain no training data at all.

In this PR I have removed a now redundant class in gpu_hist and slightly refactored the TreeUpdater base class to always require a global context for construction.

@trivialfis
Copy link
Member

Close #7728 .

@@ -532,6 +529,13 @@ struct GPUHistMakerDevice {

void ApplySplit(const GPUExpandEntry& candidate, RegTree* p_tree) {
RegTree& tree = *p_tree;

// Sanity check - have we created a leaf with no training instances?
if (!rabit::IsDistributed() && row_partitioner) {
Copy link
Member

Choose a reason for hiding this comment

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

Any potential solution if this check occurs?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it should happen with double precision. If it does it is a serious bug that will cause accuracy problems and undefined behaviour.

Copy link
Member

Choose a reason for hiding this comment

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

My mistake. I ran into issues with empty nodes in partitioner UpdatePosition, where left_count can be 0 due to floating-point errors. In this ApplySplit function, if we check on the left/right child instead of the parent (candidate), then we might run into trouble.

Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

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

Apologies for the conflict. Do you need help with rebasing?

tests/python-gpu/test_gpu_updaters.py Outdated Show resolved Hide resolved
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.

2 participants