Skip to content

Missing einops dependency causing ModuleNotFoundError #39811

@iforgetmyname

Description

@iforgetmyname

System Info

Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.

  • transformers version: 4.53.2
  • Platform: Linux-4.19.90-vhulk2211.3.0.h1543.eulerosv2r10.aarch64-aarch64-with-glibc2.35
  • Python version: 3.11.13
  • Huggingface_hub version: 0.34.3
  • Safetensors version: 0.5.3
  • Accelerate version: not installed
  • Accelerate config: not found
  • DeepSpeed version: not installed
  • PyTorch version (accelerator?): 2.6.0+cpu (NPU)
  • Tensorflow version (GPU?): not installed (NA)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Using distributed or parallel set-up in script?: yes
  • Using NPU in script?: yes
  • NPU type: Ascend910B4
  • CANN version: 8.2.RC1.alpha003

Who can help?

@ivarflakstad

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

Background: running SGLang on Ascend NPU

  1. Run with ascend/cann:8.2.rc1.alpha003-910b-ubuntu22.04-py3.11 docker image
  2. Install deps: pip install torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cpu && pip install torch_npu==2.6.0
  3. Clone sglang and run pip install -e "python[srt_npu]"
  4. Check transformers env
Image

Expected behavior

import transformers successfully

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions