Skip to content

Commit

Permalink
Merge branch 'JuliaAI:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pebeto authored Aug 5, 2023
2 parents 139ab57 + 7cea929 commit 00ade1f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions 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 <anthony.blaom@gmail.com>"]
version = "0.21.11"
version = "0.21.13"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand Down Expand Up @@ -36,7 +36,7 @@ ComputationalResources = "0.3"
DelimitedFiles = "1"
Distributions = "0.25.3"
InvertedIndices = "1"
LossFunctions = "0.10"
LossFunctions = "0.11"
MLJModelInterface = "1.7"
Missings = "0.4, 1"
OrderedCollections = "1.1"
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ repository provides core functionality for MLJ, including:
[MLJModelInterface](https://github.com/JuliaAI/MLJModelInterface.jl) (/src/interface)

- definition of **machines** and their associated methods, such as
`fit!` and `predict`/`transform` (src/machines). Serialization of machines,
however, now lives in
[MLJSerialization](https://github.com/JuliaAI/MLJSerialization.jl).
`fit!` and `predict`/`transform` (src/machines).

- MLJ's **model composition** interface, including **learning
networks**, **pipelines**, **stacks**, **target transforms** (/src/composition)
Expand Down
1 change: 1 addition & 0 deletions src/MLJBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import .Threads

# Operations & extensions
import LossFunctions
import LossFunctions.Traits
import StatsBase
import StatsBase: fit!, mode, countmap
import Missings: levels
Expand Down
8 changes: 4 additions & 4 deletions src/machines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ last_model(mach) = isdefined(mach, :old_model) ? mach.old_model : nothing
rows=nothing,
verbosity=1,
force=false,
composite=nothing
composite=nothing,
)
Without mutating any other machine on which it may depend, perform one of the following
Expand All @@ -553,7 +553,7 @@ data to `rows` if specified:
increment `mach.state`.
If the model, `model`, bound to `mach` is a symbol, then instead perform the action using
the true model `getproperty(composite, model)`.
the true model given by `getproperty(composite, model)`. See also [`machine`](@ref).
### Training action logic
Expand Down Expand Up @@ -762,13 +762,13 @@ end

"""
fit!(mach::Machine, rows=nothing, verbosity=1, force=false)
fit!(mach::Machine, rows=nothing, verbosity=1, force=false, composite=nothing)
Fit the machine `mach`. In the case that `mach` has `Node` arguments,
first train all other machines on which `mach` depends.
To attempt to fit a machine without touching any other machine, use
`fit_only!`. For more on the internal logic of fitting see
`fit_only!`. For more on options and the the internal logic of fitting see
[`fit_only!`](@ref)
"""
Expand Down
11 changes: 6 additions & 5 deletions src/operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ for operation in OPERATIONS
get!(ret, $quoted_operation, mach)
end

function $operation(mach::Machine{<:Static}, Xraw, Xraw_more...)
function $operation(mach::Machine, Xraw, Xraw_more...)
_check_and_fit_if_warranted!(mach)
ret = $(operation)(
last_model(mach),
Expand All @@ -153,10 +153,11 @@ for operation in OPERATIONS
$operation(mach::Machine, X::AbstractNode) =
node($(operation), mach, X)

$operation(mach::Machine{<:Static},
X::AbstractNode,
Xmore::AbstractNode...) =
node($(operation), mach, X, Xmore...)
$operation(
mach::Machine,
X::AbstractNode,
Xmore::AbstractNode...,
) = node($(operation), mach, X, Xmore...)
end
eval(ex)
end
Expand Down

0 comments on commit 00ade1f

Please sign in to comment.