-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
ImportError: cannot import name 'rerank' #2213
Comments
Same thing,
Unfortunately, I could not get the noisy channel example to work with older release of fairseq (and pytorch), some other issue where a file was expected to be generated (I see that this was because the code was looking for hardcoded paths like root_dir + 'new_bpe' something like that.
So I decided to update the repos and give it another go. I am yet to check the code before doing which I wanted to see if this issue was mentioned here in the official repo. Thanks |
This issue is probably related to #2738 |
Summary: - Rename type -> key in fairseq/tasks/sentence_prediction.py (fixes facebookresearch/fairseq#2746) - Update preprocessing docs (fixes facebookresearch/fairseq#2565) - Turn off logging in test_fp16_optimizer.TestGradientScaling - Documentation updates - Remove some unused code - Fix noisychannel example (fixes facebookresearch/fairseq#2213) Pull Request resolved: facebookresearch/fairseq#2786 Reviewed By: shruti-bh Differential Revision: D24515146 Pulled By: myleott fbshipit-source-id: 86b0f5516c57610fdca801c60e58158ef052fc3a
Summary: Fix fairinternal/fairseq-py#2177 for the transformer conversion to Hydra. The way the defaults are dealt with now is different so when you use the legacy Namespace configuration, you end up with a default encoder_embed_dim, which in the VGG case sets up a encoder attention in the TransformerDecoderLayer with the wrong dimentions. The easiest solution is to erase the default value for encoder_embed_dim (by forcing it to None) when converting the VGG config to the raw Namespace for the decoder layer. Tested with: `pytest tests/speech_recognition/test_vggtransformer.py -k Transformer` Pull Request resolved: fairinternal/fairseq-py#2213 Test Plan: pytest tests/speech_recognition/test_vggtransformer.py -k Transformer Reviewed By: sshleifer Differential Revision: D30425143 Pulled By: Mortimerp9 fbshipit-source-id: 92f6dea2ffbb68e441700bcc55274b3167a587b3
…bookresearch#2213) Summary: Fix fairinternal/fairseq-py#2177 for the transformer conversion to Hydra. The way the defaults are dealt with now is different so when you use the legacy Namespace configuration, you end up with a default encoder_embed_dim, which in the VGG case sets up a encoder attention in the TransformerDecoderLayer with the wrong dimentions. The easiest solution is to erase the default value for encoder_embed_dim (by forcing it to None) when converting the VGG config to the raw Namespace for the decoder layer. Tested with: `pytest tests/speech_recognition/test_vggtransformer.py -k Transformer` Pull Request resolved: fairinternal/fairseq-py#2213 Test Plan: pytest tests/speech_recognition/test_vggtransformer.py -k Transformer Reviewed By: sshleifer Differential Revision: D30425143 Pulled By: Mortimerp9 fbshipit-source-id: 92f6dea2ffbb68e441700bcc55274b3167a587b3
I executed
examples/noisychannel/rerank_tune.py
following the noisy channel example and getFile "examples/noisychannel/rerank_tune.py", line 12, in <module> from . import rerank, rerank_options ImportError: cannot import name 'rerank'
orThe text was updated successfully, but these errors were encountered: