Skip to content

Commit

Permalink
Merge pull request #108 from JuliaAI/dev
Browse files Browse the repository at this point in the history
For a 1.1.3 release
  • Loading branch information
ablaom authored Aug 11, 2021
2 parents a6e4bdd + c7ea24b commit 9a7b6ba
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MLJModelInterface"
uuid = "e80e1ace-859a-464e-9ed9-23947d8ae3ea"
authors = ["Thibaut Lienart and Anthony Blaom"]
version = "1.1.2"
version = "1.1.3"

[deps]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
27 changes: 19 additions & 8 deletions src/MLJModelInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ const MODEL_TRAITS = [
:supports_training_losses,
:deep_properties]

const ABSTRACT_MODEL_SUBTYPES =
[:Supervised,
:Unsupervised,
:Probabilistic,
:Deterministic,
:Interval,
:JointProbabilistic,
:Static]

# ------------------------------------------------------------------------
# Dependencies
using ScientificTypesBase
Expand All @@ -38,10 +47,13 @@ using Random
# mode
export LightInterface, FullInterface

# MLJ model hierarchy
export MLJType, Model, Supervised, Unsupervised,
Probabilistic, JointProbabilistic, Deterministic, Interval, Static,
UnivariateFinite
# model types
export MLJType, Model
for T in ABSTRACT_MODEL_SUBTYPES
@eval(export $T)
end

export UnivariateFinite

# parameter_inspection:
export params
Expand Down Expand Up @@ -95,13 +107,12 @@ struct InterfaceError <: Exception
m::String
end

# ------------------------------------------------------------------------
# Model types

abstract type MLJType end

abstract type Model <: MLJType end

# ------------------------------------------------------------------------
# Model subtypes

abstract type Supervised <: Model end
abstract type Unsupervised <: Model end

Expand Down

0 comments on commit 9a7b6ba

Please sign in to comment.