From 8dc86ae8c2b7abb69db76378d262ae92c2fe4836 Mon Sep 17 00:00:00 2001 From: "Anthony Blaom, PhD" Date: Thu, 30 Apr 2026 19:47:16 +1200 Subject: [PATCH 1/2] Update warning about RNG hyperparameter copies Clarify that deep copies of RNG hyperparameters should not be made. --- docs/src/reference.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/src/reference.md b/docs/src/reference.md index 281f13b..ed495b2 100644 --- a/docs/src/reference.md +++ b/docs/src/reference.md @@ -104,8 +104,10 @@ generally requires overloading `Base.==` for the struct. !!! important No LearnAPI.jl method is permitted to mutate a learner. In particular, one should make - deep copies of RNG hyperparameters before using them in an implementation of - [`fit`](@ref). + copies of RNG hyperparameters before using them in an implementation of + [`fit`](@ref). (Do not make *deep* copies as this leads to wrong behavior in the case + of `Random.default_rng()`, which not an actual RNG but only a pointer to the task-local + default RNG.) #### Kinds of learner From 37ea2bae7ade3f453a2d3462e71d879be29422a1 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Thu, 30 Apr 2026 19:50:33 +1200 Subject: [PATCH 2/2] spelling --- docs/src/predict_transform.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/predict_transform.md b/docs/src/predict_transform.md index a7db825..1f33676 100644 --- a/docs/src/predict_transform.md +++ b/docs/src/predict_transform.md @@ -23,7 +23,7 @@ The above signatures apply in the case that [`LearnAPI.kind_of(learner)`](@ref) returns [`LearnAPI.Generative()`](@ref), as in [density estimation](@ref density_estimation). -## [Typical worklows](@id predict_workflow) +## [Typical workflows](@id predict_workflow) Train some supervised `learner`: