python utils/ fails

on master after making sure I got all the deps updated (from make style/quality/fixup)

No library .py files were modified
running deps_table_update
updating src/transformers/
python utils/
python utils/
python utils/
python utils/
Checking all models are properly tested.
2021-02-04 14:36:09.588141: I tensorflow/stream_executor/platform/default/] Successfully opened dynamic library
Traceback (most recent call last):
  File "utils/", line 487, in <module>
  File "utils/", line 479, in check_repo_quality
  File "utils/", line 251, in check_all_models_are_tested
    modules = get_model_modules()
  File "utils/", line 165, in get_model_modules
    modeling_module = getattr(model_module, submodule)
  File "src/transformers/", line 1488, in __getattr__
    value = self._get_module(name)
  File "src/transformers/models/bert/", line 134, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/importlib/", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "src/transformers/models/bert/", line 20, in <module>
    import flax.linen as nn
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/flax/", line 36, in <module>
    from . import core
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/flax/core/", line 15, in <module>
    from .frozen_dict import FrozenDict, freeze, unfreeze
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/flax/core/", line 19, in <module>
    import jax
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/jax/", line 22, in <module>
    from .api import (
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/jax/", line 37, in <module>
    from . import core
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/jax/", line 31, in <module>
    from . import dtypes
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/jax/", line 31, in <module>
    from .lib import xla_client
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/jax/lib/", line 60, in <module>
    from jaxlib import cusolver
ImportError: cannot import name 'cusolver' from 'jaxlib' (/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/jaxlib/
make: *** [Makefile:28: extra_quality_checks] Error 1

1 possible answer(s) on “python utils/ fails

  1. I cannot reproduce the error on my side, but the reason seems to be a mismatch of the jax version and jaxlib as shown here: google/jax#5374 . Currently, we support jax>=0.2.0 and in the issues it says jax>=0.2.8 solves the issue. So I’d recommend that we also raise our minimum allowed version of jax ot jax>=0.2.8. What do you think?