facebookresearch / mmf

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

Documentation in installation page does not work #272

Closed ushnish closed 4 years ago

ushnish commented 4 years ago

❓ Questions and Help

I was going through the steps outlined in https://mmf.readthedocs.io/en/latest/notes/quickstart.html#training. I git cloned the repo and ran python3 setup.py develop. However later where it says run python tools/run.py I was not able to run it because tools folder only has the following items

__init__.py scripts sweeps

vedanuj commented 4 years ago

Hi @ushnish .. the docs are outdated as we are in the process of updating them due to recent beta release of mmf.

Please try this :

mmf_run config=projects/lorra/configs/textvqa/defaults.yaml datasets=textvqa model=lorra run_type=train_val
ushnish commented 4 years ago

Hello Vedanuj, thank you for your response. I ran that and it started loading data and training, however some hours later it failed with the following message

`2020-05-22T23:43:18 WARNING: /home/ushnish/mmf/mmf/datasets/processors/processors.py:402: UserWarning: No model file present at /home/ushnish/.cache/torch/mmf/wiki.en.bin. warnings.warn(f"No model file present at {model_file}.")

2020-05-22T23:43:18 INFO: Downloading FastText bin 169876453it [23:27, 120716.17it/s]██▉| 399960/400000 [00:50<00:00, 11238.10it/s] 2020-05-23T00:06:45 INFO: fastText bin downloaded at /home/ushnish/.cache/torch/mmf/wiki.en.bin. [ Downloading: https://dl.fbaipublicfiles.com/mmf/data/models/detectron/vmb_weights.tar.gz to /home/ushnish/.cache/torch/mmf/data/models/detectron.defaults/vmb_weights.tar.gz ] Downloading vmb_weights.tar.gz: 100%|██████| 15.5M/15.5M [00:02<00:00, 5.69MB/s] [ Starting checksum for vmb_weights.tar.gz]| 15.5M/15.5M [00:02<00:00, 6.63MB/s] [ Checksum successful for vmb_weights.tar.gz] Unpacking vmb_weights.tar.gz 2020-05-23T00:06:53 INFO: CUDA Device 0 is: GeForce GTX 1080 Ti 2020-05-23T00:06:57 INFO: Torch version is: 1.4.0 Traceback (most recent call last): File "/usr/local/bin/mmf_run", line 11, in load_entry_point('mmf', 'console_scripts', 'mmf_run')() File "/home/ushnish/mmf/mmf_cli/run.py", line 90, in run main(configuration, predict=predict) File "/home/ushnish/mmf/mmf_cli/run.py", line 37, in main trainer.load() File "/home/ushnish/mmf/mmf/trainers/base_trainer.py", line 61, in load self.load_model_and_optimizer() File "/home/ushnish/mmf/mmf/trainers/base_trainer.py", line 131, in load_model_and_optimizer self.load_extras() File "/home/ushnish/mmf/mmf/trainers/base_trainer.py", line 156, in load_extras self.checkpoint = Checkpoint(self) File "/home/ushnish/mmf/mmf/utils/checkpoint.py", line 108, in init self.save_config() File "/home/ushnish/mmf/mmf/utils/checkpoint.py", line 125, in save_config f.write(self.config.pretty(resolve=True)) File "/home/ushnish/.local/lib/python3.6/site-packages/omegaconf/basecontainer.py", line 200, in pretty container, default_flow_style=False, allow_unicode=True, sort_keys=sort_keys File "/usr/lib/python3/dist-packages/yaml/init.py", line 200, in dump return dump_all([data], stream, Dumper=Dumper, **kwds) TypeError: dump_all() got an unexpected keyword argument 'sort_keys' 100%|█████████████████████████████████▉| 399960/400000 [24:16<00:00, 274.65it/s]`

Just out of curiousity, as you are in the FB research team, can you tell me how this script we are running relates to the Hateful Memes Challenge? https://ai.facebook.com/blog/hateful-memes-challenge-and-data-set/ Is this for running a benchmark to show the current best results achievable by the models mentioned in the paper?

omry commented 4 years ago

That error seems like an outdated version of PyYAML. Try to upgrade it to the latest version.

apsdehal commented 4 years ago

This should be fixed in the latest pip package.

PurvagLapsiwala commented 4 years ago

where I can find mmf_run file?

apsdehal commented 4 years ago

@PurvagLapsiwala When you pip install or install mmf from source it automatically registers mmf_run command in your PYTHONPATH.