eli5 icon indicating copy to clipboard operation
eli5 copied to clipboard

Added support for Jinja2 3.1.2 and scikit-learn 1.0.2

Open dvorst opened this issue 2 years ago • 2 comments

When using Jinja2 3.1.2 and scikit-learn 1.0.2, the following errors occurred:

  • AttributeError: module 'jinja2.ext' has no attribute 'with_'
  • ModuleNotFoundError: No module named 'sklearn.metrics.scorer'
  • ModuleNotFoundError: No module named 'sklearn.feature_selection.base'

The changes in 'html.py', 'permutation_importance.py' and 'transform.py' are such that these errors are resolved while maintaining support for older versions of jinja2 and scikit-learn.

'test_import.py' is used to test importing eli5 for both newer and older dependency versions.

Also see: https://github.com/TeamHG-Memex/eli5/issues/417

dvorst avatar May 01 '22 15:05 dvorst

Can we get a merge ASAP on this? ELI5 is now broken for most use-cases since you know, most people are running this on sklearn models...

Also breaks my HF space: https://huggingface.co/spaces/Hellisotherpeople/Interpretable_Text_Classification_And_Clustering

Hellisotherpeople avatar May 10 '22 18:05 Hellisotherpeople

@Hellisotherpeople this was merged in https://github.com/eli5-org/eli5/pull/19 and released in 0.12, thanks for a reminder

lopuhin avatar May 11 '22 09:05 lopuhin