Skip to content

Commit ffe0ac2

Browse files
authored
Merge pull request #981 from JuliaAI/dev
For a 1.4 release
2 parents d5f3398 + e7afc34 commit ffe0ac2

File tree

15 files changed

+48
-33
lines changed

15 files changed

+48
-33
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MLJBase"
22
uuid = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
33
authors = ["Anthony D. Blaom <[email protected]>"]
4-
version = "1.3"
4+
version = "1.4.0"
55

66
[deps]
77
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
@@ -47,7 +47,7 @@ DelimitedFiles = "1"
4747
Distributions = "0.25.3"
4848
InvertedIndices = "1"
4949
LearnAPI = "0.1"
50-
MLJModelInterface = "1.7"
50+
MLJModelInterface = "1.10"
5151
Missings = "0.4, 1"
5252
OrderedCollections = "1.1"
5353
Parameters = "0.12"
@@ -58,7 +58,7 @@ Reexport = "1.2"
5858
ScientificTypes = "3"
5959
StatisticalMeasures = "0.1.1"
6060
StatisticalMeasuresBase = "0.1.1"
61-
StatisticalTraits = "3.2"
61+
StatisticalTraits = "3.3"
6262
Statistics = "1"
6363
StatsBase = "0.32, 0.33, 0.34"
6464
Tables = "0.2, 1.0"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## MLJBase
22

33
Repository for developers that provides core functionality for the
4-
[MLJ](https://github.com/alan-turing-institute/MLJ.jl) machine
4+
[MLJ](https://github.com/JuliaAI/MLJ.jl) machine
55
learning framework.
66

77
| Branch | Julia | Build | Coverage |
@@ -20,7 +20,7 @@ learning framework.
2020

2121
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaai.github.io/MLJBase.jl/stable/)
2222

23-
[MLJ](https://github.com/alan-turing-institute/MLJ.jl) is a Julia
23+
[MLJ](https://github.com/JuliaAI/MLJ.jl) is a Julia
2424
framework for combining and tuning machine learning models. This
2525
repository provides core functionality for MLJ, including:
2626

@@ -37,7 +37,7 @@ repository provides core functionality for MLJ, including:
3737
- basic utilities for **manipulating datasets** and for **synthesizing datasets** (src/data)
3838

3939
- a [small
40-
interface](https://alan-turing-institute.github.io/MLJ.jl/dev/evaluating_model_performance/#Custom-resampling-strategies-1)
40+
interface](https://JuliaAI.github.io/MLJ.jl/dev/evaluating_model_performance/#Custom-resampling-strategies-1)
4141
for **resampling strategies** and implementations, including `CV()`, `StratifiedCV` and
4242
`Holdout` (src/resampling.jl). Actual performance evaluation measures (aka metrics), which previously
4343
were provided by MLJBase.jl, now live in [StatisticalMeasures.jl](https://juliaai.github.io/StatisticalMeasures.jl/dev/).

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
These docs are bare-bones and auto-generated. Complete MLJ
44
documentation is
5-
[here](https://alan-turing-institute.github.io/MLJ.jl/dev/).
5+
[here](https://JuliaAI.github.io/MLJ.jl/dev/).
66

77
For MLJBase-specific developer information, see also the [README.md
88
file](https://github.com/JuliaAI/MLJBase.jl#readme).

src/composition/learning_networks/nodes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ function ScientificTypes.elscitype(
182182
end
183183

184184
# TODO after
185-
# https://github.com/alan-turing-institute/ScientificTypesBase.jl/issues/102 :
185+
# https://github.com/JuliaAI/ScientificTypesBase.jl/issues/102 :
186186
# Add Probabilistic case to above
187187

188188
ScientificTypes.scitype(N::Node) = CallableReturning{elscitype(N)}

src/composition/models/pipelines.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ end
397397

398398
# # LEARNING NETWORK INTERFACE
399399

400-
# https://alan-turing-institute.github.io/MLJ.jl/dev/composing_models/#Learning-network-machines
400+
# https://JuliaAI.github.io/MLJ.jl/dev/composing_models/#Learning-network-machines
401401

402402

403403
# ## Methods to extend a pipeline learning network
@@ -599,6 +599,9 @@ end
599599

600600
MMI.target_scitype(p::SupervisedPipeline) = target_scitype(supervised_component(p))
601601

602+
MMI.package_name(::Type{<:SomePipeline}) = "MLJBase"
603+
MMI.load_path(::Type{<:SomePipeline}) = "MLJBase.Pipeline"
604+
MMI.constructor(::Type{<:SomePipeline}) = Pipeline
602605

603606
# ## Training losses
604607

src/composition/models/stacking.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,19 +264,20 @@ function Base.setproperty!(stack::Stack{modelnames}, _name::Symbol, val) where m
264264
end
265265

266266

267+
# # TRAITS
268+
267269
MMI.target_scitype(::Type{<:Stack{modelnames, input_scitype, target_scitype}}) where
268270
{modelnames, input_scitype, target_scitype} = target_scitype
269271

270272

271273
MMI.input_scitype(::Type{<:Stack{modelnames, input_scitype, target_scitype}}) where
272274
{modelnames, input_scitype, target_scitype} = input_scitype
273275

274-
275-
MLJBase.load_path(::Type{<:ProbabilisticStack}) = "MLJBase.ProbabilisticStack"
276-
MLJBase.load_path(::Type{<:DeterministicStack}) = "MLJBase.DeterministicStack"
276+
MMI.constructor(::Type{<:Stack}) = Stack
277+
MLJBase.load_path(::Type{<:Stack}) = "MLJBase.Stack"
277278
MLJBase.package_name(::Type{<:Stack}) = "MLJBase"
278279
MLJBase.package_uuid(::Type{<:Stack}) = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
279-
MLJBase.package_url(::Type{<:Stack}) = "https://github.com/alan-turing-institute/MLJBase.jl"
280+
MLJBase.package_url(::Type{<:Stack}) = "https://github.com/JuliaAI/MLJBase.jl"
280281
MLJBase.package_license(::Type{<:Stack}) = "MIT"
281282

282283
###########################################################

src/composition/models/transformed_target_model.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const TT_SUPPORTED_ATOMS = (
1010
:Deterministic,
1111
:DeterministicUnsupervisedDetector,
1212
:DeterministicSupervisedDetector,
13-
:Interval)
13+
:Interval,
14+
)
1415

1516
# Each supported atomic type gets its own wrapper:
1617

@@ -265,6 +266,10 @@ MMI.package_uuid(::Type{<:SomeTT}) = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
265266
MMI.is_wrapper(::Type{<:SomeTT}) = true
266267
MMI.package_url(::Type{<:SomeTT}) = "https://github.com/JuliaAI/MLJBase.jl"
267268

269+
MMI.load_path(::Type{<:SomeTT}) = "MLJBase.TransformedTargetModel"
270+
MMI.constructor(::Type{<:SomeTT}) = TransformedTargetModel
271+
272+
268273
for New in TT_TYPE_EXS
269274
quote
270275
MMI.iteration_parameter(::Type{<:$New{M}}) where M =

src/interface/data_utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ MMI.selectcols(::FI, ::Val{:table}, X, ::Colon) = X
8989
function MMI.selectrows(::FI, ::Val{:table}, X, r)
9090
r = r isa Integer ? (r:r) : r
9191
# next uncommented line is a hack; see
92-
# https://github.com/alan-turing-institute/MLJBase.jl/issues/151
92+
# https://github.com/JuliaAI/MLJBase.jl/issues/151
9393
isdataframe(X) && return X[r, :]
9494
cols = Tables.columntable(X)
9595
new_cols = NamedTuple{keys(cols)}(tuple((c[r] for c in values(cols))...))

src/resampling.jl

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,9 +1548,11 @@ end
15481548
compact=false,
15491549
)
15501550
1551+
*Private method.* Use at own risk.
1552+
15511553
Resampling model wrapper, used internally by the `fit` method of `TunedModel` instances
1552-
and `IteratedModel` instances. See [`evaluate!](@ref) for options. Not intended for use by
1553-
general user, who will ordinarily use [`evaluate!`](@ref) directly.
1554+
and `IteratedModel` instances. See [`evaluate!`](@ref) for meaning of the options. Not
1555+
intended for use by general user, who will ordinarily use [`evaluate!`](@ref) directly.
15541556
15551557
Given a machine `mach = machine(resampler, args...)` one obtains a performance evaluation
15561558
of the specified `model`, performed according to the prescribed `resampling` strategy and
@@ -1592,16 +1594,6 @@ mutable struct Resampler{S, L} <: Model
15921594
compact::Bool
15931595
end
15941596

1595-
# Some traits are markded as `missing` because we cannot determine
1596-
# them from from the type because we have removed `M` (for "model"} as
1597-
# a `Resampler` type parameter. See
1598-
# https://github.com/JuliaAI/MLJTuning.jl/issues/141#issue-951221466
1599-
1600-
StatisticalTraits.is_wrapper(::Type{<:Resampler}) = true
1601-
StatisticalTraits.supports_weights(::Type{<:Resampler}) = missing
1602-
StatisticalTraits.supports_class_weights(::Type{<:Resampler}) = missing
1603-
StatisticalTraits.is_pure_julia(::Type{<:Resampler}) = true
1604-
16051597
function MLJModelInterface.clean!(resampler::Resampler)
16061598
warning = ""
16071599
if resampler.measure === nothing && resampler.model !== nothing
@@ -1787,11 +1779,16 @@ function MLJModelInterface.update(
17871779

17881780
end
17891781

1790-
# The input and target scitypes cannot be determined from the type
1791-
# because we have removed `M` (for "model") as a `Resampler` type
1792-
# parameter. See
1782+
# Some traits are marked as `missing` because we cannot determine
1783+
# them from from the type because we have removed `M` (for "model"} as
1784+
# a `Resampler` type parameter. See
17931785
# https://github.com/JuliaAI/MLJTuning.jl/issues/141#issue-951221466
17941786

1787+
StatisticalTraits.is_wrapper(::Type{<:Resampler}) = true
1788+
StatisticalTraits.supports_weights(::Type{<:Resampler}) = missing
1789+
StatisticalTraits.supports_class_weights(::Type{<:Resampler}) = missing
1790+
StatisticalTraits.is_pure_julia(::Type{<:Resampler}) = true
1791+
StatisticalTraits.constructor(::Type{<:Resampler}) = Resampler
17951792
StatisticalTraits.input_scitype(::Type{<:Resampler}) = Unknown
17961793
StatisticalTraits.target_scitype(::Type{<:Resampler}) = Unknown
17971794
StatisticalTraits.package_name(::Type{<:Resampler}) = "MLJBase"

test/_models/Constant.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ metadata_pkg.((ConstantRegressor, ConstantClassifier,
171171
DeterministicConstantRegressor, DeterministicConstantClassifier),
172172
name="MLJModels",
173173
uuid="d491faf4-2d78-11e9-2867-c94bc002c0b7",
174-
url="https://github.com/alan-turing-institute/MLJModels.jl",
174+
url="https://github.com/JuliaAI/MLJModels.jl",
175175
julia=true,
176176
license="MIT",
177177
is_wrapper=false)

0 commit comments

Comments
 (0)