python utils/check_repo.py 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/dependency_versions_table.py
python utils/check_copies.py
python utils/check_table.py
python utils/check_dummies.py
python utils/check_repo.py
Checking all models are properly tested.
2021-02-04 14:36:09.588141: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
  File "utils/check_repo.py", line 487, in <module>
    check_repo_quality()
  File "utils/check_repo.py", line 479, in check_repo_quality
    check_all_models_are_tested()
  File "utils/check_repo.py", line 251, in check_all_models_are_tested
    modules = get_model_modules()
  File "utils/check_repo.py", line 165, in get_model_modules
    modeling_module = getattr(model_module, submodule)
  File "src/transformers/file_utils.py", line 1488, in __getattr__
    value = self._get_module(name)
  File "src/transformers/models/bert/__init__.py", line 134, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/importlib/__init__.py", 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/modeling_flax_bert.py", line 20, in <module>
    import flax.linen as nn
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/flax/__init__.py", line 36, in <module>
    from . import core
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/flax/core/__init__.py", 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/frozen_dict.py", line 19, in <module>
    import jax
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/jax/__init__.py", line 22, in <module>
    from .api import (
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/jax/api.py", line 37, in <module>
    from . import core
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/jax/core.py", line 31, in <module>
    from . import dtypes
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/jax/dtypes.py", line 31, in <module>
    from .lib import xla_client
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/jax/lib/__init__.py", 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/__init__.py)
make: *** [Makefile:28: extra_quality_checks] Error 1

1 possible answer(s) on “python utils/check_repo.py 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?