From ab483bb137090a56e4d3ef34b04a13a0d412c721 Mon Sep 17 00:00:00 2001 From: Boris Feld Date: Tue, 28 Mar 2023 10:35:35 +0200 Subject: [PATCH 1/2] Update model_persistence.rst Fix example of skops.io.get_untrusted_types. With this fix, the code snippet fails with the following error: ``` In [9]: unknown_types = sio.get_untrusted_types(obj) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[9], line 1 ----> 1 unknown_types = sio.get_untrusted_types(obj) TypeError: get_untrusted_types() takes 0 positional arguments but 1 was given ``` --- doc/model_persistence.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/model_persistence.rst b/doc/model_persistence.rst index 9d3d6e941cdc5..53f01fd019d79 100644 --- a/doc/model_persistence.rst +++ b/doc/model_persistence.rst @@ -126,7 +126,7 @@ trusted by you. You can get existing unknown types in a dumped object / file using :func:`skops.io.get_untrusted_types`, and after checking its contents, pass it to the load function:: - unknown_types = sio.get_untrusted_types(obj) + unknown_types = sio.get_untrusted_types(data=obj) clf = sio.loads(obj, trusted=unknown_types) If you trust the source of the file / object, you can pass ``trusted=True``:: From a93c12d2383ee581ff77df8f17a0319365240817 Mon Sep 17 00:00:00 2001 From: adrinjalali Date: Tue, 28 Mar 2023 16:27:39 +0200 Subject: [PATCH 2/2] trigger CI