-
- Downloads
[MRG+3] FIX Memory leak in MAE; Use safe_realloc; Acquire GIL only when...
[MRG+3] FIX Memory leak in MAE; Use safe_realloc; Acquire GIL only when raising; Propagate all errors to python interpreter level (#7811) (#8002) * FIX MAE reg. criterion: Use safe_realloc to avoid memory leak * Release GIL in safe_realloc and clean up scaffolding * As gil is released in safe_realloc, no need of a with gil block * Use except * to propagate error in all cdef functions * Don't use except * for functions that return python objects * Don't use except * for the comparison function passed to qsort * Omissions and Errors * Use safe_realloc now that gil is released there * Fix realloc size * Acquire GIL only if we need to raise * Use except * more judiciously; Release gil only when raising; Add comments to clarify * Actually that was unneeded; realloc will also allocate for the first time * StackRecord*, PriorityHeapRecord* to fused type realloc_ptr; Use safe_realloc * Use except -1 to propagate exceptions. This should avoid overheads * Fix docstrings and add return 0 to reset methods * TYPO * REVIEW Remove redundant MemoryError raising calls
Showing
- sklearn/tree/_criterion.pxd 6 additions, 6 deletionssklearn/tree/_criterion.pxd
- sklearn/tree/_criterion.pyx 73 additions, 32 deletionssklearn/tree/_criterion.pyx
- sklearn/tree/_splitter.pxd 10 additions, 10 deletionssklearn/tree/_splitter.pxd
- sklearn/tree/_splitter.pyx 73 additions, 35 deletionssklearn/tree/_splitter.pyx
- sklearn/tree/_tree.pxd 3 additions, 3 deletionssklearn/tree/_tree.pxd
- sklearn/tree/_tree.pyx 26 additions, 21 deletionssklearn/tree/_tree.pyx
- sklearn/tree/_utils.pxd 17 additions, 15 deletionssklearn/tree/_utils.pxd
- sklearn/tree/_utils.pyx 53 additions, 56 deletionssklearn/tree/_utils.pyx
Loading
Please register or sign in to comment