Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I import the package ’transformer_engine.pytorch‘, the error message is as follows #1541

Open
wangli68 opened this issue Mar 6, 2025 · 1 comment
Assignees

Comments

@wangli68
Copy link

wangli68 commented Mar 6, 2025

transformer_engine 1.13.0
transformer_engine_cu12 1.13.0

python
Python 3.10.13 | packaged by conda-forge | (main, Oct 26 2023, 18:07:37) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import transformer_engine.pytorch as te
Traceback (most recent call last):
File "/openbayes/home/Test/env/wan211/lib/python3.10/site-packages/transformer_engine/pytorch/init.py", line 52, in _load_library
so_path = next(so_dir.glob(f"{module_name}.*.{extension}"))
StopIteration

@ksivaman
Copy link
Member

ksivaman commented Mar 6, 2025

Could you share the command you used to install transformer-engine? For getting the PyTorch framework extensions, the extra dependency needs to be specified via pip install transformer-engine[pytorch]. We do catch this error though to provide a better report so it could be something else.

Another possible reason is a known bug with our pip wheels that we recently resolved in #1526. As a workaround, if you installed TE from wheels (for versions 1.13 and below), you could uninstall transformer-engine first and then install TE from PyPI:

pip uninstall -y transformer-engine transformer-engine-cu12 transformer-engine-torch
pip install transformer-engine[pytorch]==1.13

@ksivaman ksivaman self-assigned this Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants