Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For a 0.21.12 release #918

Merged
merged 12 commits into from
Jul 25, 2023
Merged
17 changes: 16 additions & 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 <anthony.blaom@gmail.com>"]
version = "0.21.11"
version = "0.21.12"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand Down Expand Up @@ -33,6 +33,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
CategoricalArrays = "0.9, 0.10"
CategoricalDistributions = "0.1"
ComputationalResources = "0.3"
DelimitedFiles = "1"
Distributions = "0.25.3"
InvertedIndices = "1"
LossFunctions = "0.10"
Expand All @@ -47,3 +48,17 @@ StatisticalTraits = "3.2"
StatsBase = "0.32, 0.33, 0.34"
Tables = "0.2, 1.0"
julia = "1.6"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DecisionTree = "7806a523-6efd-50cb-b5f6-3fa6f1930dbb"
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MultivariateStats = "6f286f6a-111f-5878-ab1e-185364afe411"
NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9"

[targets]
test = ["DataFrames", "DecisionTree", "Distances", "Logging", "MultivariateStats", "NearestNeighbors", "StableRNGs", "Test", "TypedTables"]
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
9 changes: 5 additions & 4 deletions src/MLJBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,15 @@ export coerce, coerce!, autotype, schema, info
export UnivariateFiniteArray, UnivariateFiniteVector

# -----------------------------------------------------------------------
# abstract model types defined in MLJModelInterface.jl and extended here:
# re-export from MLJModelInterface.jl

#abstract model types defined in MLJModelInterface.jl and extended here:
for T in EXTENDED_ABSTRACT_MODEL_TYPES
@eval(export $T)
end

export params

# -------------------------------------------------------------------
# exports from this module, MLJBase

Expand All @@ -306,9 +310,6 @@ export default_resource
# one_dimensional_ranges.jl:
export ParamRange, NumericRange, NominalRange, iterator, scale

# parameter_inspection.jl:
export params # note this is *not* an extension of StatsBase.params

# data.jl:
export partition, unpack, complement, restrict, corestrict

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
33 changes: 0 additions & 33 deletions src/parameter_inspection.jl

This file was deleted.

26 changes: 0 additions & 26 deletions test/Project.toml

This file was deleted.

Loading