-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
performance improvements #281
Conversation
Added a commit to change matrices to Float32 before passing them to the chain - otherwise this is done inside the chain anyway, but this throws a warning which has a small overhead, even though it is not printed for some reason. I think we just forgot to do this in #272 |
The test failure is unrelated, I think? |
Great work @tiemvanderdeure identifying the performance bottleneck, @tiemvanderdeure. I just want to confirm that we are not returning to the problem reported here. Can you please check? |
Yes, it appears MLJFlux is failing on julia 1.11 |
I did reintroduce that problem (although I don't think it affects the matrix in the end). I fixed it by calling unwrap after recoding. The real problem here is that recode is type unstable in |
Okay just made a PR to CategoricalArrays.jl that also fixes this JuliaData/CategoricalArrays.jl#407 |
@tiemvanderdeure Do you want to wait to see if we get prompt action at CategoricalArrays? Or do think your current solution is a perfectly valid solution here? |
Haven't benchmarked this but I think first recoding and then unwrapping might be better even after that PR is merged. One would expect that recoding a categorical array is faster than recoding a normal array. So I think we can merge this as is. |
recode
has a specialized dispatch on categorical arrays, so calling unwrap on them has huge overhead