JuliaDecisionFocusedLearning / InferOpt.jl

Combinatorial optimization layers for machine learning pipelines
https://juliadecisionfocusedlearning.github.io/InferOpt.jl/
MIT License
114 stars 4 forks source link

Get rid of SimpleTraits? #68

Closed gdalle closed 1 year ago

gdalle commented 1 year ago

I think traits are a hassle for users who want a quick and easy implem. If the required methods do not exist for their structures, Julia will throw an error anyway. I suggest we get rid of SimpleTraits and just use unconstrained type parameters for regularization and imitation losses.

Is there a downside to this?

gdalle commented 1 year ago

One other reason is that the stack trace is pretty obscure as soon as you use traits. Try running @edit f(x) on a function defined with the macro @traitfn