Skip to content

Commit 6ca5250

Browse files
committed
add supports_training_losses() trait
1 parent eb1ab08 commit 6ca5250

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/MLJModelInterface.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const MODEL_TRAITS = [
2222
:hyperparameters,
2323
:hyperparameter_types,
2424
:hyperparameter_ranges,
25-
:iteration_parameter]
25+
:iteration_parameter,
26+
:supports_training_losses]
2627

2728
# ------------------------------------------------------------------------
2829
# Dependencies (ScientificTypes and StatisticalTraits have none)

src/model_api.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ implement this method to return an `AbstractVector` of the losses
3333
in historical order. If the model calculates scores instead, then the
3434
sign of the scores should be reversed.
3535
36+
The following trait overload is alse required:
37+
`supports_training_losses(::Type{<:M}) = true`
38+
3639
"""
3740
training_losses(model, fitresult, cache, report) = nothing
3841

0 commit comments

Comments
 (0)