Skip to content

Commit

Permalink
watchlist arguments should respect verbosity (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
ExpandingMan authored Dec 9, 2022
1 parent 0b258cf commit 608d51d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MLJXGBoostInterface"
uuid = "54119dfa-1dab-4055-a167-80440f4f7a91"
authors = ["Anthony D. Blaom <[email protected]>"]
version = "0.3.2"
version = "0.3.3"

[deps]
MLJModelInterface = "e80e1ace-859a-464e-9ed9-23947d8ae3ea"
Expand Down
3 changes: 3 additions & 0 deletions src/MLJXGBoostInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ function kwargs(model, verbosity, obj)
fn = filter((excluded), fieldnames(typeof(model)))
o = NamedTuple(n=>getfield(model, n) for n fn if !isnothing(getfield(model, n)))
o = merge(o, (silent=(verbosity 0),))
# watchlist is for log output, so override if it's default and verbosity ≤ 0
wl = (verbosity 0 && isnothing(model.watchlist)) ? (;) : model.watchlist
o = merge(o, (watchlist=wl,))
merge(o, (objective=_fix_objective(obj),))
end

Expand Down

0 comments on commit 608d51d

Please sign in to comment.