Skip to content

Commit

Permalink
Merge pull request #56 from JuliaAI/measure
Browse files Browse the repository at this point in the history
Adapt tests broken by migration of measures MLJBase.jl -> StatisticalMeasures.jl
  • Loading branch information
ablaom authored Sep 25, 2023
2 parents ffb9a25 + f93e85c commit ab5c2a8
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
15 changes: 13 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MLJIteration"
uuid = "614be32b-d00c-4edb-bd02-1eb411ab5e55"
authors = ["Anthony D. Blaom <[email protected]>"]
version = "0.5.1"
version = "0.6.0"

[deps]
IterationControl = "b3c1a2ee-3fec-4384-bf48-272ea71de57c"
Expand All @@ -11,5 +11,16 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[compat]
IterationControl = "0.5"
MLJBase = "0.20, 0.21"
MLJBase = "1"
julia = "1.6"

[extras]
JLSO = "9da8a3cd-07a3-59c0-a743-3fdc52c30d11"
MLJModelInterface = "e80e1ace-859a-464e-9ed9-23947d8ae3ea"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
StatisticalMeasures = "a19d573c-0a75-4610-95b3-7071388c7541"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["JLSO", "MLJModelInterface", "StableRNGs", "StatisticalMeasures", "Statistics", "Test"]
14 changes: 0 additions & 14 deletions test/Project.toml

This file was deleted.

1 change: 1 addition & 0 deletions test/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ using MLJIteration
using MLJBase
using ..DummyModel
using Test
using StatisticalMeasures

struct Foo <: MLJBase.Unsupervised end
struct Bar <: MLJBase.Deterministic end
Expand Down
3 changes: 2 additions & 1 deletion test/controls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ using ..DummyModel
using JLSO
using Serialization
using IterationControl
using StatisticalMeasures

const IC = IterationControl

Expand Down Expand Up @@ -62,7 +63,7 @@ end

resampler = MLJBase.Resampler(model=DummyIterativeModel(n=0),
resampling=Holdout(),
measure=[MLJBase.mae, MLJBase.rms])
measure=[mae, rms])

@testset "WithEvaluationDo" begin
v = Any[]
Expand Down
3 changes: 2 additions & 1 deletion test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using MLJIteration
using IterationControl
using MLJBase
using MLJModelInterface
using StatisticalMeasures
using ..DummyModel

X, y = make_dummy(N=20)
Expand Down Expand Up @@ -133,7 +134,7 @@ end
mach = machine(imodel, X, y)
@test_logs((:info, r"Training"),
(:info, MLJIteration.info_unspecified_iteration_parameter(:n)),
(:info, MLJIteration.info_unspecified_measure(rms)),
(:info, MLJIteration.info_unspecified_measure(l2)),
(:info, r"final loss"),
(:info, r"final train"),
(:info, r"Stop"),
Expand Down
1 change: 1 addition & 0 deletions test/ic_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ using Test
using MLJIteration
using MLJBase
using IterationControl
using StatisticalMeasures
using ..DummyModel

X, y = make_dummy(N=20)
Expand Down
1 change: 1 addition & 0 deletions test/traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ using MLJBase
using Test
using MLJIteration
using ..DummyModel
using StatisticalMeasures

model = DummyIterativeModel()
imodel = IteratedModel(model=model, measure=mae)
Expand Down

0 comments on commit ab5c2a8

Please sign in to comment.