I've found (thanks to @a-hanf) two separate problems occurring if the predict type of a learner is changed after tuning (which is a common enough use-case). In the reprex below setting model$predict_type has no effect but setting model$model$learner$predict_type does have an effect even though it claims to error #> Error: Field/Binding is read-only. So there is a bug as it actually has an effect when it shouldn't, but simultaneously this should be allowed.
My suggestion is to allow users to set model$predict_type, which internally updates model$model$learner$predict_type.
I've found (thanks to @a-hanf) two separate problems occurring if the predict type of a learner is changed after tuning (which is a common enough use-case). In the reprex below setting
model$predict_type
has no effect but settingmodel$model$learner$predict_type
does have an effect even though it claims to error#> Error: Field/Binding is read-only
. So there is a bug as it actually has an effect when it shouldn't, but simultaneously this should be allowed.My suggestion is to allow users to set
model$predict_type
, which internally updatesmodel$model$learner$predict_type
.Created on 2020-10-23 by the reprex package (v0.3.0)
EDIT:
Along the same lines just found another bug:
Created on 2020-10-23 by the reprex package (v0.3.0)