Skip to content

Importing evaluate fails with kernels v0.15: kernels now requires version or revision #46291

@jshn9515

Description

@jshn9515

System Info

Transformers version: 5.10.0.dev0
Python version: 3.14.5
Platform: Windows-11-10.0.26200-SP0
Machine: x86_64

Who can help?

@MekkCyber @drbh

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

Importing evaluate fails when kernels v0.15.1 is installed.

It looks like this is caused by a recent change in kernels: specifying either a kernel version or an explicit revision is now required for Hub-backed LayerRepository / FuncRepository entries.

According to the kernels migration guide, pulling kernels from a repository without specifying a version was deprecated in kernels 0.12 and became an error in kernels 0.15.

>> import evaluate
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import evaluate
  File "D:\Programs\Miniforge3\envs\py314\Lib\site-packages\evaluate\__init__.py", line 29, in <module>
    from .evaluation_suite import EvaluationSuite
  File "D:\Programs\Miniforge3\envs\py314\Lib\site-packages\evaluate\evaluation_suite\__init__.py", line 10, in <module>
    from ..evaluator import evaluator
  File "D:\Programs\Miniforge3\envs\py314\Lib\site-packages\evaluate\evaluator\__init__.py", line 17, in <module>
    from transformers.pipelines import SUPPORTED_TASKS as SUPPORTED_PIPELINE_TASKS
  File "D:\Programs\Miniforge3\envs\py314\Lib\site-packages\transformers\pipelines\__init__.py", line 27, in <module>
    from ..image_processing_utils import BaseImageProcessor
  File "D:\Programs\Miniforge3\envs\py314\Lib\site-packages\transformers\image_processing_utils.py", line 34, in <module>
    from .processing_utils import ImagesKwargs, Unpack
  File "D:\Programs\Miniforge3\envs\py314\Lib\site-packages\transformers\processing_utils.py", line 63, in <module>
    from .utils.type_validators import (
    ...<9 lines>...
    )
  File "D:\Programs\Miniforge3\envs\py314\Lib\site-packages\transformers\utils\type_validators.py", line 19, in <module>
    from ..activations import ACT2FN
  File "D:\Programs\Miniforge3\envs\py314\Lib\site-packages\transformers\activations.py", line 22, in <module>
    from .integrations.hub_kernels import use_kernel_forward_from_hub
  File "D:\Programs\Miniforge3\envs\py314\Lib\site-packages\transformers\integrations\hub_kernels.py", line 89, in <module>
    "cuda": LayerRepository(
            ~~~~~~~~~~~~~~~^
        repo_id="kernels-community/deformable-detr",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        layer_name="MultiScaleDeformableAttention",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "D:\Programs\Miniforge3\envs\py314\Lib\site-packages\kernels\layer\layer.py", line 76, in __init__
    raise ValueError("Either a revision or a version must be specified.")
ValueError: Either a revision or a version must be specified.

Expected behavior

import evaluate should succeed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions