Skip to content

Commit 3ece7d4

Browse files
committed
rename MLJModelRegistry -> MLJModelRegistryTools
1 parent 10a7315 commit 3ece7d4

16 files changed

+143
-127
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name = "MLJModelRegistry"
1+
name = "MLJModelRegistryTools"
22
uuid = "0a96183e-380b-4aa6-be10-c555140810f2"
33
authors = ["Anthony D. Blaom <[email protected]>"]
44
version = "0.1.0"

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# MLJModelRegistry.jl
1+
# MLJModelRegistryTools.jl
22

33
Home of the MLJ Model Registry and tools to maintain it
44

5-
[![Build Status](https://github.com/JuliaAI/MLJModelRegistry.jl/workflows/CI/badge.svg)](https://github.com/JuliaAI/MLJModelRegistry.jl/actions)
6-
[![codecov](https://codecov.io/gh/JuliaAI/MLJModelRegistry.jl/graph/badge.svg?token=9IWT9KYINZ)](https://codecov.io/gh/JuliaAI/MLJModelRegistry.jl?branch=dev)
7-
[![Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaai.github.io/MLJModelRegistry.jl/dev/)
8-
[![Docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaai.github.io/MLJModelRegistry.jl/stable/)
5+
[![Build Status](https://github.com/JuliaAI/MLJModelRegistryTools.jl/workflows/CI/badge.svg)](https://github.com/JuliaAI/MLJModelRegistryTools.jl/actions)
6+
[![codecov](https://codecov.io/gh/JuliaAI/MLJModelRegistryTools.jl/graph/badge.svg?token=9IWT9KYINZ)](https://codecov.io/gh/JuliaAI/MLJModelRegistryTools.jl?branch=dev)
7+
[![Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaai.github.io/MLJModelRegistryTools.jl/dev/)
8+
[![Docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaai.github.io/MLJModelRegistryTools.jl/stable/)
99

1010
What is this repository for? See
11-
[here](https://juliaai.github.io/MLJModelRegistry.jl/stable/#What's-this-repository-for?).
11+
[here](https://juliaai.github.io/MLJModelRegistryTools.jl/stable/#What's-this-repository-for?).
1212

1313

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
4-
MLJModelRegistry = "0a96183e-380b-4aa6-be10-c555140810f2"
4+
MLJModelRegistryTools = "0a96183e-380b-4aa6-be10-c555140810f2"
55

66
[compat]
77
Documenter = "1"

docs/make.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using Documenter
2-
using MLJModelRegistry
2+
using MLJModelRegistryTools
33
using DocumenterInterLinks
4-
using MLJModelRegistry.GenericRegistry
4+
using MLJModelRegistryTools.GenericRegistry
55

6-
const REPO = Remotes.GitHub("JuliaAI", "MLJModelRegistry.jl")
6+
const REPO = Remotes.GitHub("JuliaAI", "MLJModelRegistryTools.jl")
77

88
makedocs(
9-
modules=[MLJModelRegistry, GenericRegistry],
9+
modules=[MLJModelRegistryTools, GenericRegistry],
1010
format=Documenter.HTML(
1111
prettyurls = true,
1212
collapselevel = 1,
@@ -16,13 +16,13 @@ makedocs(
1616
"Registry management tools" => "registry_management_tools.md",
1717
"Internals" => "internals.md",
1818
],
19-
sitename="MLJModelRegistry.jl",
19+
sitename="MLJModelRegistryTools.jl",
2020
warnonly = [:cross_references, :missing_docs],
21-
repo = Remotes.GitHub("JuliaAI", "MLJModelRegistry.jl"),
21+
repo = Remotes.GitHub("JuliaAI", "MLJModelRegistryTools.jl"),
2222
)
2323

2424
deploydocs(
2525
devbranch="dev",
2626
push_preview=false,
27-
repo="github.com/JuliaAI/MLJModelRegistry.jl.git",
27+
repo="github.com/JuliaAI/MLJModelRegistryTools.jl.git",
2828
)

docs/src/index.md

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,18 @@
1-
# MLJModelRegistry.jl
1+
# MLJModelRegistryTools.jl
22

3-
Home of the MLJ Model Registry and tools to maintain it
3+
Tools to maintain the [MLJ](https://juliaml.ai) Model Registry.
44

55
# What's this repository for?
66

77
[MLJ](https://juliaml.ai) (Machine Learning in Julia) is a suite of Julia software
8-
packages providing a machine learning toolbox. The MLJModelRegistry.jl repository has two
9-
functions:
10-
11-
- It hosts the *MLJ Model Registry*, a list of packages providing MLJ interfaces to
12-
machine learning algorithms, together with metadata about those models, such as the type
13-
of data models can operate on, and their document strings.
14-
15-
- It provides software tools for MLJ maintainers to manage the Model Registry, for example
16-
to add the models provided by a new machine learning package providing an MLJ model
17-
interface for those models.
18-
19-
The model registry itself consists of files in [this
20-
folder](https://github.com/JuliaAI/MLJModelRegisry.jl/master/registry/), ordinarily
21-
accessed in one of two ways:
22-
23-
- By MLJ users, through the package
24-
[MLJModels.jl](https://github.com/JuliaAI/MLJModels.jl) which downloads the registry
25-
files as a Julia `Artifact`.
26-
27-
- By developers wishing to update the registry, but using software tools provided by the
28-
MLJModelRegistry.jl package, as described in this documentation.
8+
packages providing a machine learning toolbox. The *MLJ Model Registry*, a list of
9+
packages providing MLJ interfaces to machine learning algorithms, together with metadata
10+
about those models, such as the type of data models can operate on, and their document
11+
strings. This package provides software tools for MLJ maintainers to manage the Model
12+
Registry, for example to add the models provided by a new machine learning package
13+
providing an MLJ model interface for those models. It is not part of the standard MLJ
14+
distribution.
2915

30-
As it is intended for MLJ developers only, none of the code provided in this repository is
31-
part of the standard MLJ distribution.
32-
16+
The model registry itself is currently hosted by MLJModels.jl (part of the standard MLJ
17+
distribution) and lives in [this
18+
folder](https://github.com/JuliaAI/MLJModelRegisry.jl/master/src/registry/).

docs/src/internals.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# Internals
22

33
This page contains documentation for non-public API, for maintainers of
4-
MLJModelRegistry.jl.
4+
MLJModelRegistryTools.jl.
55

66
```@autodocs
77
Modules = [GenericRegistry]
88
```
99
```@docs
10-
MLJModelRegistry.metadata
11-
MLJModelRegistry.encode_dic
12-
MLJModelRegistry.modeltype_given_constructor(modeltypes)
13-
MLJModelRegistry.traits_given_constructor_name
10+
MLJModelRegistryTools.registry_path
11+
MLJModelRegistryTools.metadata
12+
MLJModelRegistryTools.encode_dic
13+
MLJModelRegistryTools.modeltype_given_constructor(modeltypes)
14+
MLJModelRegistryTools.traits_given_constructor_name
1415
```
1516

docs/src/registry_management_tools.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
## Overview
44

55
```@docs
6-
MLJModelRegistry
6+
MLJModelRegistryTools
77
```
88

99
## Methods
1010

11+
- [`setpath`](@ref)
1112
- [`update`](@ref)
12-
- [`MLJModelRegistry.gc`](@ref)
13-
- [`MLJModelRegistry.get`](@ref)
13+
- [`MLJModelRegistryTools.gc`](@ref)
14+
- [`MLJModelRegistryTools.get`](@ref)
1415

1516
```@docs
17+
setpath
1618
update
17-
MLJModelRegistry.gc
18-
MLJModelRegistry.get
19+
MLJModelRegistryTools.gc
20+
MLJModelRegistryTools.get
1921
```

src/GenericRegistry.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Pkg.status()
4242
# [bd369af6] Tables v1.12.1
4343
4444
Pkg.activate(temp=true)
45-
Pkg.add("MLJModelRegistry")
46-
using MLJModelRegistry.GenericRegistry
45+
Pkg.add("MLJModelRegistryTools")
46+
using MLJModelRegistryTools.GenericRegistry
4747
packages = GenericRegistry.dependencies(env)
4848
# 2-element Vector{String}:
4949
# "Tables"

src/MLJModelRegistry.jl renamed to src/MLJModelRegistryTools.jl

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,39 @@
11
"""
2-
MLJModelRegistry
2+
MLJModelRegistryTools
33
4-
Module providing methods for managing the MLJ Model Registry. To modify the registry:
5-
6-
!!! important
7-
8-
In any pull request to update the Model Registry you should note the final output of
9-
`Pkg.status(outdated=true)` when you have MLJModels/registry activated.
4+
Module providing tools for managing the MLJ Model Registry. To modify the registry:
105
116
- Create a local clone of [MLJModels.jl](https://github.com/JuliaAI/MLJModels.jl), which
127
hosts the registry. After making changes, you will be making a MLJModels.jl pull
138
request.
149
15-
- Use Julia's package manager to add or remove items from the list of registered packages
16-
in the environment "MLJModels/registry/". If adding a new item, see the protocol below.
10+
- If needed, use Julia's package manager to add or remove items from the list of
11+
registered packages in the environment "/src/registry/", inside your MLJModels.jl
12+
clone. Follow the protocol below.
1713
18-
- After adding MLJModelRegistry to some other Julia pkg environment you have activated
19-
(e.g., a fresh temporary one) run `using MLJModelRegistry` to make the management tools
20-
available.
14+
- In a new Julia session with MLJModelRegistryTools.jl installed, run `using
15+
MLJModelRegistryTools` to make the management tools available.
2116
22-
- Point MLJModelRegistry to the location of the registry itself within your MLJModels.jl
23-
clone, using `setpath(path_to_registry)`, as in `setpath("MyPkgs/MLJModels/registry")`.
17+
- Point the `MLJModelRegistryTools` module to the location of the registry itself within
18+
your MLJModels.jl clone, using `setpath(path_to_registry)`, as in
19+
`setpath("MyPkgs/MLJModels.jl/src/registry")`.
2420
2521
- To add or update the metadata associated with a package, run [`update(pkg)`](@ref).
2622
2723
- Assuming this is successful, update the metadata for *all* packages in the registry
2824
by running [`update()`](@ref).
2925
3026
- When satisfied, commit your changes to the clone and make a pull request to the
31-
MLJModelRegistry.jl repository that you cloned.
27+
MLJModels.jl repository that you cloned.
3228
33-
!!! note
29+
!!! important
3430
35-
Removing a package from the registry environment does not remove its metadata (i.e.,
36-
from "/registry/Metatdata.toml"). However if you call `update()` to update all package
37-
metadata (or call [`MLJModelRegistry.ac()`](@ref)) the metadata for all orphaned
38-
packages is removed.
31+
In any MLJModels.jl pull request to update the Model Registry you should note the
32+
final output of `Pkg.status(outdated=true)` when you have /src/registry activated.
3933
4034
# Protocol for adding new packages to the registry environment
4135
42-
1. In your local clone of MLJModelRegistry.jl, `activate` the environment at "/registry/".
36+
1. In your local clone of MLJModels.jl, `activate` the environment at "/src/registry/".
4337
4438
2. `update` the environment
4539
@@ -49,12 +43,19 @@ available.
4943
5044
4. Repeat steps 2 and 3 above, and investigate any dependency downgrades for which your addition may be the cause.
5145
52-
If adding the new package results in downgrades to existing dependencies because your
46+
If adding the new package results in downgrades to existing dependencies, because your
5347
package is not up to date with it's compatibility bounds, then your pull request to
5448
register the new models may be rejected.
5549
50+
!!! note
51+
52+
Removing a package from the registry environment does not remove its metadata. However
53+
if you call `update()` to update all package metadata (or call
54+
[`MLJModelRegistryTools.gc()`](@ref)) the metadata for all orphaned packages is
55+
removed.
56+
5657
"""
57-
module MLJModelRegistry
58+
module MLJModelRegistryTools
5859

5960
import MLJModelInterface
6061
using OrderedCollections

src/methods.jl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ function clean!(dic, pkg)
2525
return dic
2626
end
2727

28-
# develop MLJModelRegistry into the specifified `registry` project:
28+
# develop MLJModelRegistryTools into the specifified `registry` project:
2929
function setup(registry)
3030
ex = quote
3131
# REMOVE THIS NEXT LINE AFTER TAGGING NEW MLJMODELINTERFACE
3232
Pkg.develop(path="/Users/anthony/MLJ/MLJModelInterface/")
33-
Pkg.develop(path=$ROOT) # MLJModelRegistry
33+
Pkg.develop(path=$ROOT) # MLJModelRegistryTools
3434
end
3535
future = GenericRegistry.run([], ex; environment=registry)
3636
fetch(future)
3737
GenericRegistry.close(future)
3838
end
3939

40-
# remove MLJModelRegistry from the specifified `registry` project:
40+
# remove MLJModelRegistryTools from the specifified `registry` project:
4141
function cleanup(registry)
4242
ex = quote
43-
Pkg.rm("MLJModelRegistry")
43+
Pkg.rm("MLJModelRegistryTools")
4444
end
4545
future = GenericRegistry.run([], ex; environment=registry)
4646
fetch(future)
@@ -53,10 +53,10 @@ end
5353
*Private method.*
5454
5555
Extract the metadata for a package. Returns a `Future` object that must be `fetch`ed to
56-
get the metadata. See, [`MLJModelRegistry.update`](@ref), which calls this method, for
56+
get the metadata. See, [`MLJModelRegistryTools.update`](@ref), which calls this method, for
5757
more details.
5858
59-
Assumes that MLJModelRegistry has been `develop`ed into `registry` if this is non-empty.
59+
Assumes that MLJModelRegistryTools has been `develop`ed into `registry` if this is non-empty.
6060
6161
"""
6262
function metadata(pkg; registry="", check_traits=true)
@@ -68,12 +68,12 @@ function metadata(pkg; registry="", check_traits=true)
6868
setup = quote
6969
# REMOVE THIS NEXT LINE AFTER TAGGING NEW MLJMODELINTERFACE
7070
Pkg.develop(path="/Users/anthony/MLJ/MLJModelInterface/")
71-
Pkg.develop(path=$ROOT) # MLJModelRegistry
71+
Pkg.develop(path=$ROOT) # MLJModelRegistryTools
7272
end
7373
end
7474
program = quote
75-
import MLJModelRegistry
76-
MLJModelRegistry.traits_given_constructor_name(
75+
import MLJModelRegistryTools
76+
MLJModelRegistryTools.traits_given_constructor_name(
7777
$pkg,
7878
check_traits=$check_traits,
7979
)
@@ -85,7 +85,7 @@ end
8585
# # PUBLIC METHODS
8686

8787
"""
88-
MLJModelRegistry.gc()
88+
MLJModelRegistryTools.gc()
8989
9090
Remove the metadata associated with any packages that are no longer in the the model
9191
registry.
@@ -105,7 +105,7 @@ strings, and record this in the MLJ model registry (write it to
105105
106106
Assumes `pkg` is already a dependency in the Julia environment defined at `/registry/` and
107107
uses the version of `pkg` consistent with the current environment manifest, after
108-
MLJModelRegistry.jl has been `develop`ed into that environment (it is removed again after
108+
MLJModelRegistryTools.jl has been `develop`ed into that environment (it is removed again after
109109
the update). See documentation for details on the registration process.
110110
111111
```julia-repl
@@ -127,7 +127,7 @@ The metadata dictionary, keyed on models (more precisely, constructors, thereof)
127127
force latest versions if these are being blocked by other packages.
128128
129129
- `debug=false`: Calling `update` opens a temporary Julia process to extract the trait
130-
metadata (see [`MLJModelRegistry.GenericRegistry.run`](@ref)). By default, this process
130+
metadata (see [`MLJModelRegistryTools.GenericRegistry.run`](@ref)). By default, this process
131131
is shut down before rethrowing any exceptions that occurs there. Setting `debug=true`
132132
will leave the process open, and also block the default suppression of the remote worker
133133
standard output.
@@ -143,7 +143,7 @@ update(pkg, ::Quiet, registry, check_traits) =
143143
@suppress _update(pkg, false, registry, check_traits)
144144
function _update(pkg, debug, registry, check_traits)
145145
isempty(registry) || setup(registry)
146-
future = MLJModelRegistry.metadata(pkg; registry, check_traits)
146+
future = MLJModelRegistryTools.metadata(pkg; registry, check_traits)
147147
metadata = try
148148
fetch(future)
149149
catch excptn
@@ -205,7 +205,7 @@ function update(
205205
batch = pkgs[pos:pos + n - 1]
206206
@suppress begin
207207
futures =
208-
[MLJModelRegistry.metadata(pkg; registry, check_traits) for pkg in batch]
208+
[MLJModelRegistryTools.metadata(pkg; registry, check_traits) for pkg in batch]
209209
try
210210
for (i, f) in enumerate(futures)
211211
GenericRegistry.put(batch[i], fetch(f), registry_path())
@@ -226,11 +226,11 @@ function update(
226226
end
227227

228228
"""
229-
MLJModelRegistry.get(pkg)
229+
MLJModelRegistryTools.get(pkg)
230230
231231
Inspect the model trait metadata recorded in the Model Registry for those models in
232232
`pkg`. Returns a dictionary keyed on model constructor name. Data is in serialized form;
233-
see [`MLJModelRegistry.encode_dic`](@ref).
233+
see [`MLJModelRegistryTools.encode_dic`](@ref).
234234
235235
"""
236236
get(pkg) = GenericRegistry.get(pkg, registry_path())

0 commit comments

Comments
 (0)