diff --git a/sklearn/ensemble/_hist_gradient_boosting/_predictor.pyx b/sklearn/ensemble/_hist_gradient_boosting/_predictor.pyx index 5a419d7487db1..e9043909de4f5 100644 --- a/sklearn/ensemble/_hist_gradient_boosting/_predictor.pyx +++ b/sklearn/ensemble/_hist_gradient_boosting/_predictor.pyx @@ -14,7 +14,7 @@ from ._bitset cimport in_bitset_2d_memoryview def _predict_from_raw_data( # raw data = non-binned data - node_struct [:] nodes, + const node_struct [:] nodes, const X_DTYPE_C [:, :] numeric_data, const BITSET_INNER_DTYPE_C [:, ::1] raw_left_cat_bitsets, const BITSET_INNER_DTYPE_C [:, ::1] known_cat_bitsets, @@ -34,7 +34,7 @@ def _predict_from_raw_data( # raw data = non-binned data cdef inline Y_DTYPE_C _predict_one_from_raw_data( - node_struct [:] nodes, + const node_struct [:] nodes, const X_DTYPE_C [:, :] numeric_data, const BITSET_INNER_DTYPE_C [:, ::1] raw_left_cat_bitsets, const BITSET_INNER_DTYPE_C [:, ::1] known_cat_bitsets, diff --git a/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py b/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py index 23e76b4307b6f..31069fe14ee41 100644 --- a/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py +++ b/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py @@ -1165,15 +1165,7 @@ def _compute_partial_dependence_recursion(self, grid, target_features): return averaged_predictions def _more_tags(self): - return { - "allow_nan": True, - "_xfail_checks": { - "check_estimators_pickle": ( - "The memory views of the nodes parameter need to be defined" - "as read only in the Cython implementation." - ), - }, - } + return {"allow_nan": True} @abstractmethod def _get_loss(self, sample_weight):