JuliaDecisionFocusedLearning / InferOpt.jl

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

Fix JET tests #72

Open gdalle opened 1 year ago

gdalle commented 1 year ago

Since I figured out how to use JET.report_package properly, it throws a few errors for interface functions that are not implemented. For now the test is skipped, but we need to reactivate it.

gdalle commented 1 year ago

@BatyLeo the only JET test failing is linked to the generic imitation loss, care to take a look? By the way I'm not sure I like the name compute_maximizer there, can we find something a tad more specific?

BatyLeo commented 1 year ago

When I remove the @test_skip, I do not see any error with ImitationLoss

gdalle commented 1 year ago

Well then, let's do it and close this issue?

BatyLeo commented 1 year ago

There are some other errors, one fixed by #84, and one caused by the extension for RegularizedFrankWolfe I'm not sure can be fixed

gdalle commented 1 year ago

What does the FrankWolfe error look like?

BatyLeo commented 1 year ago
 ═════ 2 possible errors found ═════
  ┌ (::InferOpt.RegularizedFrankWolfe)(θ::AbstractArray; kwargs::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}}) @ InferOpt InferOpt.jl/src/regularized/regularized_frank_wolfe.jl:63
  │ no matching method found `compute_probability_distribution(::InferOpt.RegularizedFrankWolfe, ::AbstractArray)`: @_6 = compute_probability_distribution(regularized::InferOpt.RegularizedFrankWolfe, θ::AbstractArray)
  └────────────────────
  ┌ (::InferOpt.RegularizedFrankWolfe)(θ::AbstractArray; kwargs::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}}) @ InferOpt InferOpt.jl/src/regularized/regularized_frank_wolfe.jl:63
  │ no matching method found `kwcall(::NamedTuple{names, T} where {N, names, T<:Tuple{Vararg{Any, N}}}, ::typeof(InferOpt.compute_probability_distribution), ::InferOpt.RegularizedFrankWolfe, ::AbstractArray)`: @_6 = Core.kwcall(merge(Base.NamedTuple()::NamedTuple{(), Tuple{}}, kwargs::Base.Pairs{…})::NamedTuple{names, T} where {N, names, T<:Tuple{Vararg{Any, N}}}, compute_probability_distribution, regularized::InferOpt.RegularizedFrankWolfe, θ::AbstractArray)
  └────────────────────

Methods are not defined (because they are only defined in the extension)

gdalle commented 1 year ago

I thought loading DifferentiableFrankWolfe before applying JET tests would mean the extension is also loaded

BatyLeo commented 1 year ago

It does not seem to be the case inside the test_package function. Maybe there is a keyword argument to pass additional packages to load ?