|
3 | 3 | [](https://github.com/JuliaAI/MLJModels.jl/actions) |
4 | 4 | [](https://codecov.io/gh/JuliaAI/MLJModels.jl) |
5 | 5 |
|
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. |
9 | 7 |
|
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/). |
12 | 10 |
|
13 | 11 |
|
14 | 12 | ### Contents |
15 | 13 |
|
16 | 14 | - [Who is this repo for?](#who-is-this-repo-for) |
| 15 | + - [How to register new models](#how-to-register-new-models) |
17 | 16 | - [What is provided here?](#what-is-provided-here) |
18 | | - - [Instructions for updating the MLJ model registry](#instructions-for-updating-the-mlj-model-registry) |
19 | 17 |
|
20 | 18 | ## Who is this repo for? |
21 | 19 |
|
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. |
26 | 23 |
|
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: |
30 | 25 |
|
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 |
33 | 41 | [`EvoTrees.jl`](https://github.com/Evovest/EvoTrees.jl/blob/master/src/MLJ.jl); or |
34 | 42 |
|
35 | | -- implemented in a separate **interface package**, such as |
| 43 | +- in a separate **interface package**, such as |
36 | 44 | [MLJDecisionTreeInterface.jl](https://github.com/JuliaAI/MLJDecisionTreeInterface.jl). |
37 | 45 |
|
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). |
44 | 49 |
|
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) |
46 | 55 |
|
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. |
48 | 58 |
|
49 | 59 | Recall that an interface is loaded from within MLJ, together with the |
50 | 60 | package providing the underlying algorithm, using the syntax `@load |
51 | 61 | RidgeRegressor pkg=GLM`, where the `pkg` keyword is only necessary in |
52 | 62 | ambiguous cases. |
53 | 63 |
|
54 | | - |
55 | 64 | ## What is provided here? |
56 | 65 |
|
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. |
71 | 70 |
|
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 |
75 | 72 |
|
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. |
0 commit comments