Skip to content

Commit cb1d64c

Browse files
authored
Merge pull request #115 from JuliaAI/dev
For a 0.6.2 release
2 parents f4a38dd + dd525d1 commit cb1d64c

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MLJLinearModels"
22
uuid = "6ee0df7b-362f-4a72-a706-9e79364fb692"
33
authors = ["Thibaut Lienart <[email protected]>"]
4-
version = "0.6.1"
4+
version = "0.6.2"
55

66
[deps]
77
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"

src/mlj/interface.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ function MMI.fit(m::Union{REG_MODELS...}, verb::Int, X, y)
3636
features = (sch === nothing) ? nothing : sch.names
3737
reg = glr(m)
3838
solver = m.solver === nothing ? _solver(reg, size(Xmatrix)) : m.solver
39+
verb > 0 && @info "Solver: $(solver)"
3940
# get the parameters
4041
θ = fit(reg, Xmatrix, y; solver=solver)
4142
# return
@@ -72,6 +73,7 @@ function MMI.fit(m::Union{CLF_MODELS...}, verb::Int, X, y)
7273
# NOTE: here the number of classes is either 0 or > 2
7374
clf = glr(m, nclasses)
7475
solver = m.solver === nothing ? _solver(clf, size(Xmatrix)) : m.solver
76+
verb > 0 && @info "Solver: $(solver)"
7577
# get the parameters
7678
θ = fit(clf, Xmatrix, yplain, solver=solver)
7779
# return

test/interface/fitpredict.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,10 @@ end
8484
fp = MLJBase.fitted_params(mach)
8585
@test unique(fp.classes) == [1,2,3]
8686
end
87+
88+
@testset "Fitting a classifier with verbosity=1" begin
89+
mdl = LogisticClassifier()
90+
X, y = MLJBase.@load_iris
91+
mach = MLJBase.machine(mdl, X, y)
92+
@test_logs (:info,"Training Machine{LogisticClassifier,…}.") (:info,"Solver: LBFGS()") MLJBase.fit!(mach; verbosity=1)
93+
end

0 commit comments

Comments
 (0)