Skip to content

Comments

Fixes to bugs found recently and license#127

Merged
NiklasPfister merged 9 commits intoNiklasPfister:Developmentfrom
svbrodersen:fixes
May 28, 2025
Merged

Fixes to bugs found recently and license#127
NiklasPfister merged 9 commits intoNiklasPfister:Developmentfrom
svbrodersen:fixes

Conversation

@svbrodersen
Copy link
Collaborator

There were 3 main bug fixes in this pull request:
1.
segmentation fault when honest_tree sampling with low amount of datapoints. This issue was due to the predictor.root not being updated after refitting the leaf nodes, so in the case that the root node after a refit was different than previously, then the predictor.root would point to an invalid node.

Default sampling parameters fails when reused.
This was due to the way numpy integers work. The check isinstance(val, int) returns false on any type of numpy integer.
Fix: added np.integer to the checks, such that we check isinstance(val, (int, np.integer))

refit_leaf_nodes expected np.int64, but generally we work with np.int32. Changed the RandomForest to now use the default np.int32, and changed the expected type of sample_indices to the np.int32.

@svbrodersen svbrodersen added the bug Something isn't working label May 26, 2025
Copy link

@np-lakera np-lakera left a comment

Choose a reason for hiding this comment

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

Tested and everything works. Thanks!

@NiklasPfister NiklasPfister merged commit af5355f into NiklasPfister:Development May 28, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants