Skip to content

Commit 37381d6

Browse files
authored
Merge pull request #11 from JuliaAI/dev
Bump MLJTuning version for upstream reproducibility fix
2 parents fd65539 + 0613646 commit 37381d6

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MLJParticleSwarmOptimization"
22
uuid = "17a086e9-ed03-4f30-ab88-8b63f0f6126c"
33
authors = ["Long Nguyen <[email protected]> and contributors"]
4-
version = "0.1.0"
4+
version = "0.1.1"
55

66
[deps]
77
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
@@ -13,5 +13,5 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1313
[compat]
1414
Distributions = "0.25"
1515
MLJBase = "0.18"
16-
MLJTuning = "0.6"
16+
MLJTuning = "0.6.11"
1717
julia = "1.4"

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[deps]
22
ComputationalResources = "ed09eef8-17a6-5b46-8889-db040fac31e3"
3+
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
34
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
45
EvoTrees = "f6006082-12f8-11e9-0c9c-0d5d367ab1e5"
56
MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"

test/runtests.jl

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
using MLJParticleSwarmOptimization
2-
using Random
3-
using Test
4-
using ComputationalResources
5-
using Distributions
6-
using EvoTrees
7-
using MLJBase
8-
using MLJTuning
9-
using StableRNGs
1+
using Distributed
2+
addprocs(2)
3+
4+
@everywhere begin
5+
using MLJParticleSwarmOptimization
6+
using Random
7+
using Test
8+
using ComputationalResources
9+
using Distributions
10+
using EvoTrees
11+
using MLJBase
12+
using MLJTuning
13+
using StableRNGs
14+
end
1015

1116
const PSO = MLJParticleSwarmOptimization
1217

test/strategies/adaptive.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,9 @@ for acceleration in (CPU1(), CPUProcesses(), CPUThreads())
9191
baseline_self_tuning_tree = TunedModel(
9292
model=tree,
9393
tuning=RandomSearch(rng=StableRNG(1234)),
94-
# tuning=ParticleSwarm(n_particles=3, rng=rng),
9594
resampling=CV(nfolds=5, rng=StableRNG(8888)),
9695
range=[r1, r2],
97-
measure=(ŷ, y) -> mean(abs.(ŷ .- y)),
96+
measure=mae,
9897
n=15,
9998
acceleration=acceleration
10099
)
@@ -108,7 +107,7 @@ for acceleration in (CPU1(), CPUProcesses(), CPUThreads())
108107
tuning=AdaptiveParticleSwarm(rng=StableRNG(1234)),
109108
resampling=CV(nfolds=5, rng=StableRNG(8888)),
110109
range=[r1, r2],
111-
measure=(ŷ, y) -> mean(abs.(ŷ .- y)),
110+
measure=mae,
112111
n=15,
113112
acceleration=acceleration
114113
)

test/strategies/basic.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ for acceleration in (CPU1(), CPUProcesses(), CPUThreads())
3030
baseline_self_tuning_tree = TunedModel(
3131
model=tree,
3232
tuning=RandomSearch(rng=StableRNG(1234)),
33-
# tuning=ParticleSwarm(n_particles=3, rng=rng),
3433
resampling=CV(nfolds=5, rng=StableRNG(8888)),
3534
range=[r1, r2],
36-
measure=(ŷ, y) -> mean(abs.(ŷ .- y)),
35+
measure=mae,
3736
n=15,
3837
acceleration=acceleration
3938
)
@@ -47,7 +46,7 @@ for acceleration in (CPU1(), CPUProcesses(), CPUThreads())
4746
tuning=ParticleSwarm(rng=StableRNG(1234)),
4847
resampling=CV(nfolds=5, rng=StableRNG(8888)),
4948
range=[r1, r2],
50-
measure=(ŷ, y) -> mean(abs.(ŷ .- y)),
49+
measure=mae,
5150
n=15,
5251
acceleration=acceleration
5352
)

0 commit comments

Comments
 (0)