8000 proposal to use .joblib file extension (#11230) · scikit-learn/scikit-learn@355d880 · GitHub
[go: up one dir, main page]

Skip to content

Commit 355d880

Browse files
yufenggogrisel
authored andcommitted
proposal to use .joblib file extension (#11230)
Recommend to use of `filename.joblib` instead of `filename.pkl` for models persisted via the joblib library to reduce confusion when it comes to time load a model, as it will be more clear whether a file was saved using the `pickle` or `joblib` library.
1 parent 553b5fb commit 355d880

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/modules/model_persistence.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ is often the case for fitted scikit-learn estimators, but can only pickle to the
4242
disk and not to a string::
4343

4444
>>> from sklearn.externals import joblib
45-
>>> joblib.dump(clf, 'filename.pkl') # doctest: +SKIP
45+
>>> joblib.dump(clf, 'filename.joblib') # doctest: +SKIP
4646

4747
Later you can load back the pickled model (possibly in another Python process)
4848
with::
4949

50-
>>> clf = joblib.load('filename.pkl') # doctest:+SKIP
50+
>>> clf = joblib.load('filename.joblib') # doctest:+SKIP
5151

5252
.. note::
5353

0 commit comments

Comments
 (0)
0