diff --git a/src/machines.jl b/src/machines.jl index 76ec904c..a7473642 100644 --- a/src/machines.jl +++ b/src/machines.jl @@ -580,10 +580,10 @@ or none of the following apply: changed since the last time `mach` was trained (ie, the last time `mach.state` was last incremented). -4. The specified `rows` have changed since the last retraining and +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 +5. `mach.model` is a model and 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 @@ -658,7 +658,7 @@ function fit_only!( rows === nothing && (rows = (:)) rows_is_new = !isdefined(mach, :old_rows) || rows != mach.old_rows - condition_iv = rows_is_new && !(mach.model isa Static) + condition_4 = rows_is_new && !(mach.model isa Static) upstream_has_changed = mach.old_upstream_state != upstream_state @@ -672,16 +672,16 @@ function fit_only!( # build or update cached `resampled_data` if necessary (`mach.data` is already defined # above if needed here): - if cache_data && (!data_is_valid || condition_iv) + if cache_data && (!data_is_valid || condition_4) mach.resampled_data = selectrows(model, rows, mach.data...) end # `fit`, `update`, or return untouched: - if mach.state == 0 || # condition (i) - force == true || # condition (ii) - upstream_has_changed || # condition (iii) - condition_iv || # condition (iv) - modeltype_changed # conditions (vi) or (vii) + if mach.state == 0 || # condition (1) + force == true || # condition (2) + upstream_has_changed || # condition (3) + condition_4 || # condition (4) + modeltype_changed # conditions (6) or (7) isdefined(mach, :report) || (mach.report = LittleDict{Symbol,Any}()) @@ -709,7 +709,7 @@ function fit_only!( rethrow() end - elseif model != mach.old_model # condition (v) + elseif model != mach.old_model # condition (5) # update the model: fitlog(mach, :update, verbosity)