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
ImportError: cannot import name 'TransformerDecoderLayer' from partially initialized module 'fairseq.modules' (most likely due to a circular import) (.../fairseq/fairseq/modules/__init__.py)
#231
I had run the pretrain task before, but now I'm facing this error after running bash pretrain_ofa_base.sh:
ImportError: cannot import name 'TransformerDecoderLayer' from partially initialized module 'fairseq.modules' (most likely due to a circular import) (.../fairseq/fairseq/modules/__init__.py)
Full log:
Traceback (most recent call last):
File "../../train.py", line 29, in <module>
from fairseq import (
File ".../OFA/fairseq/fairseq/quantization_utils.py", line 8, in <module>
from fairseq.modules.quantization import pq, quantization_options, scalar
File ".../OFA/fairseq/fairseq/modules/__init__.py", line 39, in <module>
from .transformer_layer import TransformerDecoderLayer, TransformerEncoderLayer
File ".../OFA/fairseq/fairseq/modules/transformer_layer.py", line 15, in <module>
from fairseq.models.transformer import (
File ".../OFA/fairseq/fairseq/models/__init__.py", line 236, in <module>
import_models(models_dir, "fairseq.models")
File ".../OFA/fairseq/fairseq/models/__init__.py", line 218, in import_models
importlib.import_module(namespace + "." + model_name)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File ".../fairseq/fairseq/models/nat/__init__.py", line 12, in <module>
from .levenshtein_transformer import *
File ".../OFA/fairseq/fairseq/models/nat/levenshtein_transformer.py", line 13, in <module>
from fairseq.modules import TransformerDecoderLayer
ImportError: cannot import name 'TransformerDecoderLayer' from partially initialized module 'fairseq.modules' (most likely due to a circular import(.../OFA/fairseq/fairseq/modules/__init__.py)
The text was updated successfully, but these errors were encountered:
Hi,
I had run the pretrain task before, but now I'm facing this error after running
bash pretrain_ofa_base.sh
:Full log:
The text was updated successfully, but these errors were encountered: