У меня трансформеры 4.25.1 и Keras 3.4.1 с Python 3.9 под Windows.
permutation_importance использует Transformers\utils\import_utils.py
, который создает:
line 1095, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.modeling_tf_utils
because of the following error
No module named 'keras.engine'
Подробнее здесь: https://stackoverflow.com/questions/789 ... ras-engine