mmf
mmf copied to clipboard
AttributeError: 'VisualGenomeDataset' object has no attribute '_get_absolute_path'
🐛 Bug
File "/home/ubuntu/vqa/GMN/mmf/mmf/datasets/builders/visual_genome/dataset.py", line 44, in init scene_graph_file = self._get_absolute_path(scene_graph_file) AttributeError: 'VisualGenomeDataset' object has no attribute '_get_absolute_path'
Command that i run in shell
CUDA_VISIBLE_DEVICES="0" mmf_run config=projects/gmn/configs/visual_genome/defaults.yaml model=gmn datasets=visual_genome run_type=train env.data_dir=/media/ubuntu/MyDisk/data_mmf/vg
To Reproduce
I ran the command above where gmn is a model class inheriting from Pythia and get this error:
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/mmf4/bin/mmf_run", line 33, in
Additional context
I have changed the first lines of the following config file for using more information from the dataset. "mmf/projects/gmn/configs/visual_genome/defaults.yaml"
dataset_config: visual_genome: return_scene_graph: true # false return_objects: true # false return_relationships: true # false return_features_info: true # false return_region_descriptions: true no_unk: true
Discussion
I found that the attribute '_get_absolute_path' has not been written yet. That is why the error occurs when "return_scene_graph", "return_objects", "return_relationships" are true.
I print the sample_list for pythia and found ['text', 'question_id', 'image_id', 'image_feature_0', 'image_feature_1', 'targets', 'dataset_name', 'dataset_type'] where no region descriptions appear. Is there any way to use the region descriptions, scene graphs, objects, etc. of visual genome? Do I need to include those items in sample_list to use them?
Hi, thanks for reporting this. This will need a fix. Would you like to open up a PR?
Hi @apsdehal , I want to work on this issue. I observed that this issue is still there and there is get_absolute_path function available in the code. Can I use the same function? Let me know if my understanding is correct.
Hey @apsdehal I want to work on this issue. I observed that this issue is still there and there is a get_absolute_path function available in the code. Can I work on this issue?