From fa9d2817c34442384c8ceadb24882531be648408 Mon Sep 17 00:00:00 2001 From: Miles Cranmer Date: Fri, 12 Apr 2024 04:31:49 +0900 Subject: [PATCH] docs: update __getstate__ docstring --- pysr/sr.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pysr/sr.py b/pysr/sr.py index 1b24a9c94..cb3a05c66 100644 --- a/pysr/sr.py +++ b/pysr/sr.py @@ -1057,15 +1057,8 @@ def __getstate__(self): Handle pickle serialization for PySRRegressor. The Scikit-learn standard requires estimators to be serializable via - `pickle.dumps()`. However, `PyCall.jlwrap` does not support pickle - serialization. - - Thus, for `PySRRegressor` to support pickle serialization, the - `julia_state_stream_` attribute must be hidden from pickle. This will - prevent the `warm_start` of any model that is loaded via `pickle.loads()`, - but does allow all other attributes of a fitted `PySRRegressor` estimator - to be serialized. Note: Jax and Torch format equations are also removed - from the pickled instance. + `pickle.dumps()`. However, some attributes do not support pickling + and need to be hidden, such as the JAX and Torch representations. """ state = self.__dict__ show_pickle_warning = not (