fairseq
fairseq copied to clipboard
Trying to convert the model to TorchScript fails in 0.12.2
🐛 Bug
To Reproduce
I tried to convert a model to TorchScript. This works in 0.10.1 and in 0.12.1 but fails in 0.12.2. The issue I see is:
object has no attribute _transformer_encoder_layer_fwd:
File "/opt/venv/lib/python3.7/site-packages/fairseq/modules/transformer_layer.py", line 319
Expected behavior
To convert successfully to TorchScript like in the other Fairseq versions.
Environment
- fairseq Version (e.g., 1.0 or main): 0.12.2
- PyTorch Version (e.g., 1.0): 1.11.0
- OS (e.g., Linux): Linux
- How you installed fairseq (
pip, source): pip - Build command you used (if compiling from source):
- Python version: 3.7
- CUDA/cuDNN version: 11.0
- GPU models and configuration: V100