From d9cf7d0dff8eafd6d51378b7aecc202f09c7bea3 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Sun, 19 Oct 2025 19:01:56 +1300 Subject: [PATCH 1/4] typo in docs --- docs/src/testing_an_implementation.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/src/testing_an_implementation.md b/docs/src/testing_an_implementation.md index ebcf64a..c6e9378 100644 --- a/docs/src/testing_an_implementation.md +++ b/docs/src/testing_an_implementation.md @@ -1,7 +1,5 @@ # Testing an Implementation -Testing is provided by the LearnTestAPI.jl package. - Testing is provided by the LearnTestAPI.jl package documented below. ## Quick start From 3418f9cf076891d59e2cd05f7c033d1ca57406ba Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Sun, 19 Oct 2025 19:05:58 +1300 Subject: [PATCH 2/4] doc fix --- docs/src/index.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index a8fe9c4..bbe4c37 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -27,8 +27,6 @@ functionality, such as external performance estimates, hyperparameter optimizati model composition, provided by ML/statistics toolboxes and other packages. LearnAPI.jl includes a number of Julia [traits](@ref traits) for promising specific behavior. -LearnAPI.jl's has no package dependencies. - ## Sample workflow From 477d69a0e864555946362be627b68ee35065eca8 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Sun, 19 Oct 2025 19:13:54 +1300 Subject: [PATCH 3/4] rm redundant is_static method (forgotten in v 2.0) --- docs/src/traits.md | 2 -- src/traits.jl | 26 -------------------------- test/traits.jl | 1 - 3 files changed, 29 deletions(-) diff --git a/docs/src/traits.md b/docs/src/traits.md index 1eb49ed..4191ac7 100644 --- a/docs/src/traits.md +++ b/docs/src/traits.md @@ -31,7 +31,6 @@ In the examples column of the table below, `Continuous` is a name owned the pack | [`LearnAPI.data_interface`](@ref)`(learner)` | Interface implemented by objects returned by [`obs`](@ref) | `Base.HasLength()` (supports `MLCore.getobs/numobs`) | `Base.SizeUnknown()` (supports `iterate`) | | [`LearnAPI.fit_scitype`](@ref)`(learner)` | upper bound on `scitype(data)` ensuring `fit(learner, data)` works | `Union{}` | `Tuple{AbstractVector{Continuous}, Continuous}` | | [`LearnAPI.target_observation_scitype`](@ref)`(learner)` | upper bound on the scitype of each observation of the targget | `Any` | `Continuous` | -| [`LearnAPI.is_static`](@ref)`(learner)` | `true` if `fit` consumes no data | `false` | `true` | ### Derived Traits @@ -109,7 +108,6 @@ LearnAPI.data_interface LearnAPI.iteration_parameter LearnAPI.fit_scitype LearnAPI.target_observation_scitype -LearnAPI.is_static ``` ```@docs diff --git a/src/traits.jl b/src/traits.jl index 655b228..4fefee7 100644 --- a/src/traits.jl +++ b/src/traits.jl @@ -389,32 +389,6 @@ tables, and tuples of these. See the doc-string for details. """ data_interface(::Any) = LearnAPI.RandomAccess() -""" - LearnAPI.is_static(learner) - -Returns `true` if [`fit`](@ref) is called with no data arguments, as in -`fit(learner)`. That is, `learner` does not generalize to new data, and data is only -provided at the `predict` or `transform` step. - -For example, some clustering algorithms are applied with this workflow, to assign labels -to the observations in `X`: - -```julia -model = fit(learner) # no training data -labels = predict(model, X) # may mutate `model`! - -# extract some byproducts of the clustering algorithm (e.g., outliers): -LearnAPI.extras(model) -``` - -# New implementations - -This trait, falling back to `false`, may only be overloaded when `fit` has no data -arguments. See more at [`fit`](@ref). - -""" -is_static(::Any) = false - """ LearnAPI.iteration_parameter(learner) diff --git a/test/traits.jl b/test/traits.jl index 6a99a02..4ccf0c8 100644 --- a/test/traits.jl +++ b/test/traits.jl @@ -46,7 +46,6 @@ small = SmallLearner() @test LearnAPI.data_interface(small) == LearnAPI.RandomAccess() @test !(6 isa LearnAPI.fit_scitype(small)) @test 6 isa LearnAPI.target_observation_scitype(small) -@test !LearnAPI.is_static(small) # DERIVED TRAITS From 73e9446987592d667ac445703c268cb43da69ffa Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Sun, 19 Oct 2025 19:14:35 +1300 Subject: [PATCH 4/4] bump 2.0.1 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index c129a5d..9f6bed2 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ authors = ["Anthony D. Blaom "] name = "LearnAPI" uuid = "92ad9a40-7767-427a-9ee6-6e577f1266cb" -version = "2.0.0" +version = "2.0.1" [compat] Preferences = "1.5.0"