Skip to content

Commit 62c8cca

Browse files
committed
restrict compute_gap signature
1 parent 13271fd commit 62c8cca

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/Utils/interface.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,6 @@ Plot the instance with `sample.y` overlaid. Only available when `Plots` is loade
150150
"""
151151
function plot_solution end
152152

153-
"""
154-
compute_gap(::AbstractBenchmark, dataset::Vector{<:DataSample}, statistical_model, maximizer) -> Float64
155-
156-
Compute the average relative optimality gap of the pipeline on the dataset.
157-
"""
158-
function compute_gap end
159-
160153
"""
161154
$TYPEDSIGNATURES
162155
@@ -190,11 +183,12 @@ end
190183
$TYPEDSIGNATURES
191184
192185
Default implementation of [`compute_gap`](@ref): average relative optimality gap over `dataset`.
193-
Requires samples with `x`, `θ`, and `y` fields. Override for custom evaluation logic.
186+
Requires labeled samples (`y ≠ nothing`), `x`, and `maximizer_kwargs` fields.
187+
Override for custom evaluation logic.
194188
"""
195189
function compute_gap(
196190
bench::AbstractBenchmark,
197-
dataset::AbstractVector{<:DataSample},
191+
dataset::AbstractVector{<:DataSample{<:Any,<:Any,<:Any,<:AbstractArray}},
198192
statistical_model,
199193
maximizer,
200194
op=mean,

0 commit comments

Comments
 (0)