JuliaML / LossFunctions.jl

Julia package of loss functions for machine learning.
https://juliaml.github.io/LossFunctions.jl/stable
Other
148 stars 34 forks source link

Convert CategoricalArrays.jl to extension? #167

Closed MilesCranmer closed 1 year ago

MilesCranmer commented 1 year ago

Currently the CategoricalArrays.jl dependency is fairly costly in terms of load time. Despite LossFunctions.jl itself only taking 6.5ms to load, the CategoricalArrays dependency takes 100ms. But from looking through the code, the CategoricalArrays.jl is more of an extension rather than a core library used in the code.

So perhaps it could be converted into a dependency to cut down on load times?

juliohm commented 1 year ago

Good idea @MilesCranmer , can you submit a PR that requires Julia v1.9 and implements the proposal?

MilesCranmer commented 1 year ago

Done in #168.

It uses Requires.jl for lower Julia versions, for backwards compatibility.

juliohm commented 1 year ago

Patch released: https://github.com/JuliaRegistries/General/pull/88036