yzhao062/pyod

Cannot save AutoEncoder

Open

#256 geöffnet am 6. Dez. 2020

Auf GitHub ansehen
 (6 Kommentare) (1 Reaktion) (1 zugewiesene Person)Python (1.308 Forks)batch import
buggood first issuehelp wanted

Repository-Metriken

Stars
 (7.762 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 17h) (14 gemergte PRs in 30 T)

Beschreibung

The official instructions say to use joblib for pickling PyOD models.

This fails for AutoEncoders, or any other TensorFlow-backed model as far as I can tell. The error is:

>>> dump(model, 'model.joblib')
...
TypeError: can't pickle _thread.RLock objects

Note that it's not sufficient to save the underlying Keras Sequential model, since I need the methods & variables of BaseDetector (like .decision_scores_ or .decision_function().

Contributor Guide