OFA
OFA copied to clipboard
ConfigKeyError on VQA inference
Dear authors, Thanks for your excellent work! But when I follow the VQA inference steps, I encounter the following problems.
- When I use scripts
evaluate_vqa_allcand.sh
andevaluate_vqa_allcand.sh
for multi-GPU inference, there is an error:RuntimeError: CUDA error: invalid device ordinal
. However, I've checked the index ofCUDA_VISIBLE_DEVICES
and the pytorch version fits the CUDA version (RTX 3090 Ti, CUDA 10.1--pytorch 1.8.1, torchvision 0.9.1). - I try fine-tuning with a single GPU
CUDA_VISIBLE_DEVICES=0 python3 ../../evaluate.py
and it doesn't report theCUDA error
any more, but a new error exist:
omegaconf.errors.ConfigKeyError: Key 'outputs' not in 'VqaGenConfig'
full_key: outputs
reference_type=Optional[VqaGenConfig]
object_type=VqaGenConfig
There isn't an "outputs" key in the scripts nor in the definition of class VqaGenConfig, I just wonder how to fix it? Thank you so much for your help!
Hi, could you please share the exact script you ran?
Hi - I am encountering this issue as well when trying to run beam search inference. I have created an environment with the requirements installed, have downloaded necessary data and checkpoints.
I am running bash evaluate_vqa_beam.sh test
on two GPUs and receive:
omegaconf.errors.ConfigKeyError: Key 'train_ans2label_file' not in 'VqaGenConfig' full_key: train_ans2label_file reference_type=Optional[VqaGenConfig] object_type=VqaGenConfig
I am not finding a fix for this error - any advice?
@eugfomitcheva Hi, could you please share the exact script you ran? Meanwhile, are you using the fairseq codebase included in this OFA repo or using the official fairseq?
This is actually a good point @yangapku - fairseq in the repo wouldn't build for me (issue #270 ) so I created a new environment and installed it from scratch there. The underlying problem may the error I mentioned where I receive
ERROR: Failed building wheel for pycocotools ERROR: Failed building editable for fairseq
when running pip install -r requirements.txt
. Would you know the resolution to this?
Hi, I have the same issue with Key 'train_ans2label_file' not in 'VqaGenConfig' full_key: train_ans2label_file
. I don't think that I have problems with the fairseq, since all imports are done ok.
I tried to run the script on 1-2 gpu and always got errors.
Edit: No, it appeared that I had problems with fairseq.
Hi, I have the same issue with
Key 'train_ans2label_file' not in 'VqaGenConfig' full_key: train_ans2label_file
. I don't think that I have problems with the fairseq, since all imports are done ok.I tried to run the script on 1-2 gpu and always got errors.
Edit: No, it appeared that I had problems with fairseq.
Hi, you can try the suggestion —— "using the fairseq codebase included in this OFA repo” and that truly works for me.
@eugfomitcheva Hi, could you please share the exact script you ran? Meanwhile, are you using the fairseq codebase included in this OFA repo or using the official fairseq?
Thank you very much!