facebookresearch / mmf

A modular framework for vision & language multimodal research from Facebook AI Research (FAIR)
https://mmf.sh/
Other
5.5k stars 939 forks source link

how to set env.data_dir when reproduce the hateful_meme baseline? #483

Closed chuanHN closed 4 years ago

chuanHN commented 4 years ago

❓ Questions and Help

I want to reproduce the baseline of the hateful memes. So I followed the steps in README The steps I have done:

But when I run the command `mmf_run config=mmf/projects/hateful_memes/configs/unimodal/image.yaml model=unimodal_image dataset=hateful_memes

The error occurred: `7626.train | [2020-08-17T12:51:18Z] Traceback (most recent call last): 7626.train | [2020-08-17T12:51:18Z] File "/usr/local/bin/mmf_run", line 8, in 7626.train | [2020-08-17T12:51:18Z] sys.exit(run()) 7626.train | [2020-08-17T12:51:18Z] File "/usr/local/lib/python3.7/dist-packages/mmf_cli/run.py", line 111, in run 7626.train | [2020-08-17T12:51:18Z] main(configuration, predict=predict) 7626.train | [2020-08-17T12:51:18Z] File "/usr/local/lib/python3.7/dist-packages/mmf_cli/run.py", line 40, in main 7626.train | [2020-08-17T12:51:18Z] trainer.load() 7626.train | [2020-08-17T12:51:18Z] File "/usr/local/lib/python3.7/dist-packages/mmf/trainers/base_trainer.py", line 59, in load 7626.train | [2020-08-17T12:51:18Z] self.load_datasets() 7626.train | [2020-08-17T12:51:18Z] File "/usr/local/lib/python3.7/dist-packages/mmf/trainers/base_trainer.py", line 83, in load_datasets 7626.train | [2020-08-17T12:51:18Z] self.dataset_loader.load_datasets() 7626.train | [2020-08-17T12:51:18Z] File "/usr/local/lib/python3.7/dist-packages/mmf/common/dataset_loader.py", line 17, in load_datasets 7626.train | [2020-08-17T12:51:18Z] self.train_dataset.load(self.config) 7626.train | [2020-08-17T12:51:18Z] File "/usr/local/lib/python3.7/dist-packages/mmf/datasets/multi_dataset_loader.py", line 114, in load 7626.train | [2020-08-17T12:51:18Z] self.build_datasets(config) 7626.train | [2020-08-17T12:51:18Z] File "/usr/local/lib/python3.7/dist-packages/mmf/datasets/multi_dataset_loader.py", line 131, in build_datasets 7626.train | [2020-08-17T12:51:18Z] dataset_instance = build_dataset(dataset, dataset_config, self.dataset_type) 7626.train | [2020-08-17T12:51:18Z] File "/usr/local/lib/python3.7/dist-packages/mmf/utils/build.py", line 105, in build_dataset 7626.train | [2020-08-17T12:51:18Z] builder_instance.build_dataset(config, dataset_type) 7626.train | [2020-08-17T12:51:18Z] File "/usr/local/lib/python3.7/dist-packages/mmf/datasets/base_dataset_builder.py", line 77, in build_dataset 7626.train | [2020-08-17T12:51:18Z] self.build(config, dataset_type, *args, **kwargs) 7626.train | [2020-08-17T12:51:18Z] File "/usr/local/lib/python3.7/dist-packages/mmf/da tasets/builders/hateful_memes/builder.py", line 58, in build 7626.train | [2020-08-17T12:51:18Z] "Hateful Memes Dataset doesn't do automatic downloads; please " 7626.train | [2020-08-17T12:51:18Z] AssertionError: Hateful Memes Dataset doesn't do automatic downloads; please follow instructions at https://fb.me/hm_prerequisites

I have tried to solve the problem but failed. For example: set the DATA_DIR=/data/mmf

So how can I solve the problem and reproduce the baseline?

apsdehal commented 4 years ago

Hi,

As the error suggests, have you tried following the steps in https://fb.me/hm_prerequisites to register in hateful memes challenge, download the data and then run mmf_hm_convert command?

chuanHN commented 4 years ago

@apsdehal Thanks for your reply.

Yes, I have tried the steps in https://fb.me/hm_prerequisites to register in hateful memes, download the data and unzip it using the mmf_hm_convert. I saved it in /riseml/workspace/chuan/data/mmf_folder. I use the riseml and ali cloud platform. Does it matter?

apsdehal commented 4 years ago

Please add this at the end of your command:

env.data_dir=/riseml/workspace/chuan/data/mmf_folder

I believe the format is proper otherwise it won't work.

chuanHN commented 4 years ago

@apsdehal It works. Thank you.