Skip to content

Commit 7a16932

Browse files
authored
Merge pull request #592 from JuliaAI/remove-built-in-transformers
Complete migration of transformers out of this package
2 parents c35207e + d3d068b commit 7a16932

File tree

12 files changed

+1892
-4492
lines changed

12 files changed

+1892
-4492
lines changed

Project.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MLJModels"
22
uuid = "d491faf4-2d78-11e9-2867-c94bc002c0b7"
33
authors = ["Anthony D. Blaom <[email protected]>"]
4-
version = "0.17.9"
4+
version = "0.18.0"
55

66
[deps]
77
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
@@ -38,6 +38,7 @@ Distributions = "0.25"
3838
InteractiveUtils = "1"
3939
LinearAlgebra = "1"
4040
MLJModelInterface = "1.10"
41+
MLJTransforms = "0.1.1"
4142
Markdown = "1"
4243
OrderedCollections = "1.1"
4344
Parameters = "0.12"
@@ -58,10 +59,11 @@ Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
5859
MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
5960
MLJDecisionTreeInterface = "c6f25543-311c-4c74-83dc-3ea6d1015661"
6061
MLJMultivariateStatsInterface = "1b6a4a23-ba22-4f51-9698-8599985d3728"
62+
MLJTransforms = "23777cdb-d90c-4eb0-a694-7c2b83d5c1d6"
6163
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
6264
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
6365
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
6466
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
6567

6668
[targets]
67-
test = ["Distributed", "MLJBase", "MLJDecisionTreeInterface", "MLJMultivariateStatsInterface", "Pkg", "StableRNGs", "Suppressor", "Test"]
69+
test = ["Distributed", "MLJBase", "MLJDecisionTreeInterface", "MLJMultivariateStatsInterface", "MLJTransforms", "Pkg", "StableRNGs", "Suppressor", "Test"]

README.md

Lines changed: 43 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,77 +3,74 @@
33
[![Build Status](https://github.com/JuliaAI/MLJModels.jl/workflows/CI/badge.svg)](https://github.com/JuliaAI/MLJModels.jl/actions)
44
[![codecov](https://codecov.io/gh/JuliaAI/MLJModels.jl/graph/badge.svg?token=KgarnnCc0K)](https://codecov.io/gh/JuliaAI/MLJModels.jl)
55

6-
Repository of the "built-in" models available for use in the
7-
[MLJ](https://github.com/JuliaAI/MLJ.jl) MLJ machine
8-
learning framework; and the home of the MLJ model registry.
6+
Home of the [MLJ](https://juliaml.ai) Model Registry and tools for model search and model code loading.
97

10-
For instructions on integrating a new model with MLJ visit
11-
[here](https://JuliaAI.github.io/MLJ.jl/dev/adding_models_for_general_use/)
8+
For instructions on integrating a new model into MLJ visit
9+
[here](https://juliaai.github.io/MLJModelInterface.jl/stable/).
1210

1311

1412
### Contents
1513

1614
- [Who is this repo for?](#who-is-this-repo-for)
15+
- [How to register new models](#how-to-register-new-models)
1716
- [What is provided here?](#what-is-provided-here)
18-
- [Instructions for updating the MLJ model registry](#instructions-for-updating-the-mlj-model-registry)
1917

2018
## Who is this repo for?
2119

22-
General users of the MLJ machine learning platform should refer to
23-
[MLJ home page](https://JuliaAI.github.io/MLJ.jl/dev/)
24-
for usage and installation instructions. MLJModels is a dependency of
25-
MLJ that the general user can ignore.
20+
Newcomers to MLJ should refer to [this page](https://juliaml.ai) for usage and
21+
installation instructions. MLJModels.jl is a dependency of MLJ that the general user can
22+
ignore.
2623

27-
This repository is for developers wishing to
28-
[register](#instructions-for-updating-the-mlj-model-registry) new MLJ
29-
model interfaces, whether they be:
24+
This repository is for developers maintaining:
3025

31-
- implemented **natively** in a
32-
package providing the core machine learning algorithm, as in
26+
- The [MLJ Model Registry](/src/registry), a database of packages implementing the MLJ
27+
interface for machine learning models, together with metadata about those models.
28+
29+
- MLJ tools for searching the database (`models(...)` and `matching(...)`) and for loading
30+
model code (`@load`, `@iload`).
31+
32+
## How to register new models
33+
34+
The model registry lives at "/src/registry" but
35+
is maintained using
36+
[MLJModelRegistryTools.jl](https://juliaai.github.io/MLJModelRegistryTools.jl/dev/).
37+
38+
New MLJ model interfaces can be implemented either:
39+
40+
- **natively** in a package providing the core machine learning algorithm, as in
3341
[`EvoTrees.jl`](https://github.com/Evovest/EvoTrees.jl/blob/master/src/MLJ.jl); or
3442

35-
- implemented in a separate **interface package**, such as
43+
- in a separate **interface package**, such as
3644
[MLJDecisionTreeInterface.jl](https://github.com/JuliaAI/MLJDecisionTreeInterface.jl).
3745

38-
It also a place for developers to add models (mostly transformers)
39-
such as `OneHotEncoder`, that are exported for "built-in" use in
40-
MLJ. (In the future these models may live in a separate package.)
41-
42-
To list *all* model interfaces currently registered, do `using MLJ` or
43-
`using MLJModels` and run:
46+
In either case, the package providing the implementation needs to be added to the MLJ
47+
Model Registry to make it discoverable by MLJ users, and to make the model metadata
48+
searchable. To register a package, prepare a pull request to MLJModels.jl by following [these instructions](https://juliaai.github.io/MLJModelRegistryTools.jl/dev/registry_management_tools/#Registry-management-tools).
4449

45-
- `localmodels()` to list built-in models (updated when external models are loaded with `@load`)
50+
Currently, after registering the model, one must also make a PR to MLJ updating [this
51+
dictionary of model
52+
descriptors](https://github.com/JuliaAI/MLJ.jl/blob/dev/docs/ModelDescriptors.toml) to
53+
ensure the new models appear in the right places in MLJ's [Model
54+
Browser](https://JuliaAI.github.io/MLJ.jl/dev/model_browser/#Model-Browser)
4655

47-
- `models()` to list all registered models, or see [this list](/src/registry/Models.toml).
56+
To list *all* model interfaces currently registered, do `using MLJ` or `using MLJModels`
57+
and run `models()` to list all registered models.
4858

4959
Recall that an interface is loaded from within MLJ, together with the
5060
package providing the underlying algorithm, using the syntax `@load
5161
RidgeRegressor pkg=GLM`, where the `pkg` keyword is only necessary in
5262
ambiguous cases.
5363

54-
5564
## What is provided here?
5665

57-
MLJModels contains:
58-
59-
- transformers to be pre-loaded into MLJ, located at
60-
[/src/builtins](/src/builtins), such as `OneHotEncoder`
61-
and `ConstantClassifier`.
62-
63-
- the MLJ [model registry](src/registry/Metadata.toml), listing all
64-
models that can be called from MLJ using `@load`. Package developers
65-
can register new models by implementing the MLJ interface in their
66-
package and following [these
67-
instructions](https://JuliaAI.github.io/MLJ.jl/dev/adding_models_for_general_use/).
68-
69-
70-
## Instructions for updating the MLJ model registry
66+
The actual MLJ Model Registry consists of the TOML files in [this
67+
directory](/src/registry). A few models available for immediate use in MLJ (without
68+
loading model code using `@load`) are also provided by this package, under "/src/builtins"
69+
but these may be moved out in the future.
7170

72-
Generally model registration is performed by administrators. If you
73-
have an interface you would like registered, open an issue
74-
[here](https://github.com/JuliaAI/MLJ.jl/issues).
71+
### Historical note
7572

76-
**Administrator instructions.** These are given in the
77-
`MLJModels.@update` document string. After registering the model, make a PR to MLJ
78-
updating [this dictionary of model descriptors](https://github.com/JuliaAI/MLJ.jl/blob/dev/docs/ModelDescriptors.toml)
79-
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)
73+
Older versions of MLJModels.jl contained some of the models now residing at
74+
[MLJTransforms.jl](https://github.com/JuliaAI/MLJTransforms.jl/tree/dev). Even older
75+
versions provided implementations of all the non-native implementations of the
76+
MLJ interface.

src/MLJModels.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ include("utilities.jl")
6060

6161
# load built-in models:
6262
include("builtins/Constant.jl")
63-
include("builtins/Transformers.jl")
6463
include("builtins/ThresholdPredictors.jl")
6564

6665
# declare paths to the metadata and associated project file:

0 commit comments

Comments
 (0)