Skip to content

Commit

Permalink
Merge pull request #559 from JuliaAI/dev
Browse files Browse the repository at this point in the history
For a 0.17 release
  • Loading branch information
ablaom authored Jun 5, 2024
2 parents c1d1c4c + 0dcf82c commit 5340efe
Show file tree
Hide file tree
Showing 18 changed files with 1,315 additions and 874 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v3
with:
file: lcov.info
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MLJModels"
uuid = "d491faf4-2d78-11e9-2867-c94bc002c0b7"
authors = ["Anthony D. Blaom <[email protected]>"]
version = "0.16.17"
version = "0.17.0"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand Down Expand Up @@ -37,7 +37,7 @@ Distributions = "0.25"
InteractiveUtils = "<0.0.1, 1"
LinearAlgebra = "<0.0.1, 1"
Markdown = "<0.0.1, 1"
MLJModelInterface = "1.4"
MLJModelInterface = "1.10"
OrderedCollections = "1.1"
Parameters = "0.12"
Pkg = "<0.0.1, 1"
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# MLJModels

[![Build Status](https://github.com/alan-turing-institute/MLJModels.jl/workflows/CI/badge.svg)](https://github.com/alan-turing-institute/MLJModels.jl/actions)
[![Build Status](https://github.com/JuliaAI/MLJModels.jl/workflows/CI/badge.svg)](https://github.com/JuliaAI/MLJModels.jl/actions)

Repository of the "built-in" models available for use in the
[MLJ](https://github.com/alan-turing-institute/MLJ.jl) MLJ machine
[MLJ](https://github.com/JuliaAI/MLJ.jl) MLJ machine
learning framework; and the home of the MLJ model registry.

For instructions on integrating a new model with MLJ visit
[here](https://alan-turing-institute.github.io/MLJ.jl/dev/adding_models_for_general_use/)
[here](https://JuliaAI.github.io/MLJ.jl/dev/adding_models_for_general_use/)


### Contents
Expand All @@ -19,7 +19,7 @@ For instructions on integrating a new model with MLJ visit
## Who is this repo for?

General users of the MLJ machine learning platform should refer to
[MLJ home page](https://alan-turing-institute.github.io/MLJ.jl/dev/)
[MLJ home page](https://JuliaAI.github.io/MLJ.jl/dev/)
for usage and installation instructions. MLJModels is a dependency of
MLJ that the general user can ignore.

Expand All @@ -32,7 +32,7 @@ model interfaces, whether they be:
[`EvoTrees.jl`](https://github.com/Evovest/EvoTrees.jl/blob/master/src/MLJ.jl); or

- implemented in a separate **interface package**, such as
[MLJDecisionTreeInterface.jl](https://github.com/alan-turing-institute/MLJDecisionTreeInterface.jl).
[MLJDecisionTreeInterface.jl](https://github.com/JuliaAI/MLJDecisionTreeInterface.jl).

It also a place for developers to add models (mostly transformers)
such as `OneHotEncoder`, that are exported for "built-in" use in
Expand Down Expand Up @@ -63,16 +63,16 @@ MLJModels contains:
models that can be called from MLJ using `@load`. Package developers
can register new models by implementing the MLJ interface in their
package and following [these
instructions](https://alan-turing-institute.github.io/MLJ.jl/dev/adding_models_for_general_use/).
instructions](https://JuliaAI.github.io/MLJ.jl/dev/adding_models_for_general_use/).


## Instructions for updating the MLJ model registry

Generally model registration is performed by administrators. If you
have an interface you would like registered, open an issue
[here](https://github.com/alan-turing-institute/MLJ.jl/issues).
[here](https://github.com/JuliaAI/MLJ.jl/issues).

**Administrator instructions.** These are given in the
`MLJModels.@update` document string. After registering the model, make a PR to MLJ
updating [this dictionary of model descriptors](https://github.com/alan-turing-institute/MLJ.jl/blob/dev/docs/ModelDescriptors.toml)
to ensure the new models appear in the right places in MLJ's [Model Browser](https://alan-turing-institute.github.io/MLJ.jl/dev/model_browser/#Model-Browser)
updating [this dictionary of model descriptors](https://github.com/JuliaAI/MLJ.jl/blob/dev/docs/ModelDescriptors.toml)
to ensure the new models appear in the right places in MLJ's [Model Browser](https://JuliaAI.github.io/MLJ.jl/dev/model_browser/#Model-Browser)
10 changes: 5 additions & 5 deletions src/MLJModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ nonmissing = nonmissingtype

include("utilities.jl")

# load built-in models:
include("builtins/Constant.jl")
include("builtins/Transformers.jl")
include("builtins/ThresholdPredictors.jl")

Handle = NamedTuple{(:name, :pkg), Tuple{String,String}}
(::Type{Handle})(name,string) = NamedTuple{(:name, :pkg)}((name, string))

Expand All @@ -79,11 +84,6 @@ include("loading.jl")
include("registry/src/Registry.jl")
using .Registry

# load built-in models:
include("builtins/Constant.jl")
include("builtins/Transformers.jl")
include("builtins/ThresholdPredictors.jl")

# finalize:
include("init.jl")

Expand Down
2 changes: 1 addition & 1 deletion src/builtins/Constant.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ metadata_pkg.(
DeterministicConstantRegressor, DeterministicConstantClassifier),
name = "MLJModels",
uuid = "d491faf4-2d78-11e9-2867-c94bc002c0b7",
url = "https://github.com/alan-turing-institute/MLJModels.jl",
url = "https://github.com/JuliaAI/MLJModels.jl",
julia = true,
license = "MIT",
is_wrapper = false)
Expand Down
12 changes: 3 additions & 9 deletions src/builtins/ThresholdPredictors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,9 @@ MMI.package_name(::Type{<:ThresholdUnion}) = "MLJModels"
MMI.package_uuid(::Type{<:ThresholdUnion}) = ""
MMI.is_wrapper(::Type{<:ThresholdUnion}) = true
MMI.package_url(::Type{<:ThresholdUnion}) =
"https://github.com/alan-turing-institute/MLJModels.jl"

for New in THRESHOLD_TYPE_EXS
New_str = string(New)
quote
MMI.load_path(::Type{<:$New{M}}) where M = "MLJModels."*$New_str
end |> eval
end

"https://github.com/JuliaAI/MLJModels.jl"
MMI.load_path(::Type{<:ThresholdUnion}) = "MLJModels.BinaryThresholdPredictor"
MMI.constructor(::Type{<:ThresholdUnion}) = BinaryThresholdPredictor

for trait in [:supports_weights,
:supports_class_weights,
Expand Down
Loading

0 comments on commit 5340efe

Please sign in to comment.