Skip to content

Commit

Permalink
Merge pull request #862 from JuliaAI/dev
Browse files Browse the repository at this point in the history
For a 0.21 release
  • Loading branch information
ablaom authored Nov 7, 2022
2 parents 644f57e + d5cb5f4 commit 9e12621
Show file tree
Hide file tree
Showing 44 changed files with 3,371 additions and 2,649 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- master
- dev
- for-a-0-point-20-release
- for-a-0-point-21-release
- next-breaking-release
push:
branches:
Expand Down
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.20.20"
version = "0.21.0"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand Down Expand Up @@ -36,7 +36,7 @@ ComputationalResources = "0.3"
Distributions = "0.25.3"
InvertedIndices = "1"
LossFunctions = "0.5, 0.6, 0.7, 0.8"
MLJModelInterface = "1.6"
MLJModelInterface = "1.7"
Missings = "0.4, 1"
OrderedCollections = "1.1"
Parameters = "0.12"
Expand Down
38 changes: 26 additions & 12 deletions src/MLJBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module MLJBase
# IMPORTS

import Base: ==, precision, getindex, setindex!
import Base.+, Base.*
import Base.+, Base.*, Base./

# Scitype
using ScientificTypes
Expand Down Expand Up @@ -38,7 +38,7 @@ for name in exported_names(MLJModelInterface)
:UnivariateFinite,
:augmented_transform,
:info,
:scitype # Needed to avoid clashing with `ScientificTypes.scitype`
:scitype # Needed to avoid clashing with `ScientificTypes.scitype`
] && continue
quote
import MLJModelInterface.$name
Expand Down Expand Up @@ -198,15 +198,19 @@ include("models.jl")
include("sources.jl")
include("machines.jl")

include("composition/abstract_types.jl")
include("composition/deprecated_abstract_types.jl")
include("composition/learning_networks/nodes.jl")
include("composition/learning_networks/inspection.jl")
include("composition/learning_networks/machines.jl")

include("composition/models/methods.jl")
include("composition/models/from_network.jl")
include("composition/learning_networks/signatures.jl")
include("composition/learning_networks/deprecated_machines.jl")
include("composition/learning_networks/replace.jl")

include("composition/models/deprecated_pipelines.jl")
include("composition/models/deprecated_methods.jl")
include("composition/models/network_composite_types.jl")
include("composition/models/network_composite.jl")
include("composition/models/deprecated_from_network.jl")
include("composition/models/inspection.jl")
include("composition/models/deprecated.jl")
include("composition/models/pipelines.jl")
include("composition/models/transformed_target_model.jl")

Expand All @@ -229,6 +233,14 @@ include("composition/models/stacking.jl")
# function on the right-hand side is defined in src/measures/meta_utilities.jl:
const MEASURE_TYPES_ALIASES_AND_INSTANCES = measures_for_export()

const EXTENDED_ABSTRACT_MODEL_TYPES = vcat(
MLJBase.MLJModelInterface.ABSTRACT_MODEL_SUBTYPES,
MLJBase.NETWORK_COMPOSITE_TYPES, # src/composition/models/network_composite_types.jl
MLJBase.COMPOSITE_TYPES, # src/composition/abstract_types.jl
MLJBase.SURROGATE_TYPES, # src/composition/abstract_types.jl
[:MLJType, :Model, :NetworkComposite, :Surrogate, :Composite],
)

# ===================================================================
## EXPORTS

Expand Down Expand Up @@ -279,6 +291,11 @@ export coerce, coerce!, autotype, schema, info
# re-exports from CategoricalDistributions:
export UnivariateFiniteArray, UnivariateFiniteVector

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

# -------------------------------------------------------------------
# exports from this module, MLJBase
Expand Down Expand Up @@ -313,7 +330,7 @@ export source, Source, CallableReturning

# machines.jl:
export machine, Machine, fit!, report, fit_only!, default_scitype_check_level,
serializable
serializable, last_model

# datasets_synthetics.jl
export make_blobs, make_moons, make_circles, make_regression
Expand All @@ -328,9 +345,6 @@ export machines, sources, @from_network, @pipeline, Stack,

export TransformedTargetModel

# aliases to the above, kept for backwards compatibility:
export DeterministicNetwork, ProbabilisticNetwork, UnsupervisedNetwork

# resampling.jl:
export ResamplingStrategy, Holdout, CV, StratifiedCV, TimeSeriesCV,
evaluate!, Resampler, PerformanceEvaluation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,3 @@ MLJModelInterface.package_name(::Type{<:Union{Composite,Surrogate}}) = "MLJBase"
for T in surrogate_types
MLJModelInterface.load_path(::Type{T}) = string("MLJBase.", T)
end

export MLJType, Model, Surrogate, Composite
for T in vcat(MMI.ABSTRACT_MODEL_SUBTYPES, COMPOSITE_TYPES, SURROGATE_TYPES)
@eval(export $T)
end
Loading

0 comments on commit 9e12621

Please sign in to comment.