diff --git a/Project.toml b/Project.toml index a68ab8aa..23912096 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MLJBase" uuid = "a7f614a8-145f-11e9-1d2a-a57a1082229d" authors = ["Anthony D. Blaom "] -version = "1.9.0" +version = "1.9.1" [deps] CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" diff --git a/src/machines.jl b/src/machines.jl index a7473642..0eaf2779 100644 --- a/src/machines.jl +++ b/src/machines.jl @@ -583,17 +583,17 @@ or none of the following apply: 4. The specified `rows` have changed since the last retraining and `mach.model` does not have `Static` type. -5. `mach.model` is a model and different from the last model used for training, but has - the same type. +5. `mach.model` is a `Model` (i.e, not a symbol) and is different from the last model used + for training (but has the same type). -6. `mach.model` is a model but has a type different from the last model used for +6. `mach.model` is a `Model` but has a type different from the last model used for training. -7. `mach.model` is a symbol and `(composite, mach.model)` is different from the last - model used for training, but has the same type. +7. `mach.model` is a symbol and `getproperty(composite, mach.model)` is different from the + last model used for training (but has the same type). -8. `mach.model` is a symbol and `(composite, mach.model)` has a different type from - the last model used for training. +8. `mach.model` is a symbol and `getproperty(composite, mach.model)` has a different type + from the last model used for training. In any of the cases (1) - (4), (6), or (8), `mach` is trained ab initio. If (5) or (7) is true, then a training update is applied. @@ -645,6 +645,7 @@ function fit_only!( mach.model end + # neither `old_model` nor `model` are symbols here: modeltype_changed = !isdefined(mach, :old_model) ? true : typeof(model) === typeof(mach.old_model) ? false : true diff --git a/src/show.jl b/src/show.jl index 7a5d0310..8b9201e8 100644 --- a/src/show.jl +++ b/src/show.jl @@ -78,32 +78,6 @@ function handle(X) end -## SHOW METHOD FOR NAMED TUPLES - -# long version of showing a named tuple: -Base.show(stream::IO, ::MIME"text/plain", t::NamedTuple) = fancy_nt(stream, t) -fancy_nt(t) = fancy_nt(stdout, t) # is this used? -fancy_nt(stream, t::NamedTuple{(), Tuple{}}) = print(stream, "NamedTuple()") -fancy_nt(stream, t) = fancy_nt(stream, t, 0) -fancy_nt(stream, t, n) = show(stream, t) -function fancy_nt(stream, t::NamedTuple, n) - print(stream, "(") - first_item = true - for k in keys(t) - value = getproperty(t, k) - if !first_item - print(stream, crind(n + 1)) - else - first_item = false - end - print(stream, "$k = ") - fancy_nt(stream, value, n + length("$k = ") + 1) - print(stream, ",") - end - print(stream, ")") -end - - ## OTHER EXPOSED SHOW METHODS # string consisting of carriage return followed by indentation of length n: