When using skl2onnx for exporting pipelines using HistGradientBoostingRegressor, we are seeing significant discrepancies in the output (double-digit relative error on some inputs) even when we use the CastTransformer to float32-cast inputs to the regressor. For reference, our pipeline looks something like
Pipeline([
("preprocessor", ColumnTransformer([("categorical", TargetEncoder(), categorical_features), ("numeric", "passthrough", numeric_features)])),
("cast", CastTransformer(dtype=np.float32)),
("regressor", HistGradientBoostingRegressor())
])
My suspicion is that the way histogram-based gradient boosting generates buckets and decision thresholds requires the same float64->float32 threshold adjustment that the normal GradientBoostingRegressor gets, even when the inputs are float32.