Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MLJBase"
uuid = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
authors = ["Anthony D. Blaom <[email protected]>"]
version = "1.9.0"
version = "1.9.1"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand Down
15 changes: 8 additions & 7 deletions src/machines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
26 changes: 0 additions & 26 deletions src/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading