Skip to content

Commit 9a7b6ba

Browse files
authored
Merge pull request #108 from JuliaAI/dev
For a 1.1.3 release
2 parents a6e4bdd + c7ea24b commit 9a7b6ba

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MLJModelInterface"
22
uuid = "e80e1ace-859a-464e-9ed9-23947d8ae3ea"
33
authors = ["Thibaut Lienart and Anthony Blaom"]
4-
version = "1.1.2"
4+
version = "1.1.3"
55

66
[deps]
77
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

src/MLJModelInterface.jl

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ const MODEL_TRAITS = [
2626
:supports_training_losses,
2727
:deep_properties]
2828

29+
const ABSTRACT_MODEL_SUBTYPES =
30+
[:Supervised,
31+
:Unsupervised,
32+
:Probabilistic,
33+
:Deterministic,
34+
:Interval,
35+
:JointProbabilistic,
36+
:Static]
37+
2938
# ------------------------------------------------------------------------
3039
# Dependencies
3140
using ScientificTypesBase
@@ -38,10 +47,13 @@ using Random
3847
# mode
3948
export LightInterface, FullInterface
4049

41-
# MLJ model hierarchy
42-
export MLJType, Model, Supervised, Unsupervised,
43-
Probabilistic, JointProbabilistic, Deterministic, Interval, Static,
44-
UnivariateFinite
50+
# model types
51+
export MLJType, Model
52+
for T in ABSTRACT_MODEL_SUBTYPES
53+
@eval(export $T)
54+
end
55+
56+
export UnivariateFinite
4557

4658
# parameter_inspection:
4759
export params
@@ -95,13 +107,12 @@ struct InterfaceError <: Exception
95107
m::String
96108
end
97109

98-
# ------------------------------------------------------------------------
99-
# Model types
100-
101110
abstract type MLJType end
102-
103111
abstract type Model <: MLJType end
104112

113+
# ------------------------------------------------------------------------
114+
# Model subtypes
115+
105116
abstract type Supervised <: Model end
106117
abstract type Unsupervised <: Model end
107118

0 commit comments

Comments
 (0)