ModuleNotFoundError: No module named 'sklearn.ensemble.forest' when loading content of Sentinel 2 novelty detector.
When trying to unpickle a random forest model built with sklearn<0.22
in an environment with sklearn>=0.22
a ModuleNotFoundError
occurs. With sklearn
version 0.22
sklearn.ensemble.forest
changed to sklearn.ensemble._forest
. Previously, a ModuleNotFoundError
could have been prevented by pinning sklearn<0.22
. However, this is now not compatible anymore with the latest python versions. Due to the way how pickle
works the only way to fix this would basically be to retrain the novelty detector using the latest version of sklearn
.
Edited by Niklas Bohn