You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using distributed or parallel set-up in script?: No
Using GPU in script?: No
GPU type: NVIDIA GeForce RTX 3090
Who can help?
No response
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
This GitHub issue is not about resolving the errors below, it's about a logical error in the code that produces the errors.
I get the following error running some code:
ImportError: This modeling file requires the following packages that were not found in your environment: flash_attn.
But I have flash_attn installed. The underlying problem is that when importing flash_attn, some other code throws an ImportError, but that error is swallowed by transformers code.
To be specific, the logical mistake is in the check_imports function. It assumes that if you get an ImportError when trying to import a package, it means that the package isn't installed.
That's probably a fine assumption most of the time, but when something's going wrong like in my case, it makes it hard to find out what because the real error is being swallowed and replaced. This is the real error, by the way:
ImportError: libcudart.so.11.0: cannot open shared object file: No such file or directory
To reiterate, this issue is not about resolving these errors, it's about fixing the code that masks useful errors (although it someone happens to know the fix, great).
Expected behavior
You should show the original error and then if you want to, also show the hand-written "missing packages" message.
The text was updated successfully, but these errors were encountered:
System Info
transformers
version: 4.42.3Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
This GitHub issue is not about resolving the errors below, it's about a logical error in the code that produces the errors.
I get the following error running some code:
But I have
flash_attn
installed. The underlying problem is that when importingflash_attn
, some other code throws anImportError
, but that error is swallowed bytransformers
code.To be specific, the logical mistake is in the check_imports function. It assumes that if you get an
ImportError
when trying to import a package, it means that the package isn't installed.That's probably a fine assumption most of the time, but when something's going wrong like in my case, it makes it hard to find out what because the real error is being swallowed and replaced. This is the real error, by the way:
To reiterate, this issue is not about resolving these errors, it's about fixing the code that masks useful errors (although it someone happens to know the fix, great).
Expected behavior
You should show the original error and then if you want to, also show the hand-written "missing packages" message.
The text was updated successfully, but these errors were encountered: