Closed ablaom closed 1 year ago
Thank you @ablaom for raising this issue and apologies for a delayed response. I have submitted a PR #96 which is now mutating the model parameters for each candidate (trial) rather than constructing new model instances based on their types. I have tested it with latest EvoTrees (both classifier and regressors) as well as with a selection of other MLJ supported models. Once the PR is reviewed and merged, we'll get it released and notify you.
The fix is now available on v0.3.3
Thank you @kainkad. Appreciate the ongoing support of this package.
Describe the bug The bug is reported and explained here.
To Reproduce Steps to reproduce the behavior: See the post above.
Expected behavior No fail.
Environment (please complete the following information): Unknown, but likely not relevant given the diagnosis already given.
Additional context Here's a further clarification of the issue:
Instead of constructing new model instances with
typeof(mode)(; parameters)
, which is failing for model types with parameters as above, I suggest creating a deep copy of the model and mutating the parameters usingsetproperty
for eachproperty in propertynames(model)
.