sort by:
Revision Author Date Message Commit Date
b093095 Bump y18n from 3.2.1 to 3.2.2 in /website (#845) Summary: Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/yargs/y18n/commits">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~oss-bot">oss-bot</a>, a new releaser for y18n since your current version.</p> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=y18n&package-manager=npm_and_yarn&previous-version=3.2.1&new-version=3.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookresearch/mmf/network/alerts). </details> Pull Request resolved: https://github.com/facebookresearch/mmf/pull/845 Reviewed By: ytsheng, apsdehal Differential Revision: D27495488 Pulled By: vedanuj fbshipit-source-id: b9ea33ea2e6d23d9f2c877860da5f5ce4c952516 07 April 2021, 23:02:47 UTC
66a988a [fix] Download functionality work for frcnn (#858) Summary: Fixed the downloading functionality for the FRCNN feature extraction script. This resolves the TODO of using the mmf download functionality to download the configs and models. Also updated the script to directly use the huggingface urls Resolves: https://github.com/facebookresearch/mmf/issues/836 Pull Request resolved: https://github.com/facebookresearch/mmf/pull/858 Reviewed By: vedanuj Differential Revision: D27571075 Pulled By: brettallenyo fbshipit-source-id: ab7ff27fd2b6156946c26c619a7e67b440d8af11 06 April 2021, 21:45:32 UTC
332f60e [feat][2/N] clip text/image encoder (#163) Summary: * Added text/image encoders * Added the pretrained checkpoint loading for those encoders We should make it composable in the future - ie., make the encoders configurable with params Pull Request resolved: https://github.com/fairinternal/mmf-internal/pull/163 Reviewed By: vedanuj Differential Revision: D27447444 Pulled By: ytsheng fbshipit-source-id: e2de1752df497cbbe9f689ad08b482565d883e29 06 April 2021, 10:59:06 UTC
d9812a6 [fix] test error when using the new datamodule api (#855) Summary: * Updated the TrainerTrainingLoop object to use the new datamodules API + iteration_strategy API * Fixed bug related to API change for the per_gpu_batch_size test * Fixed the test_eval test to use the new API * Fixed the default iteration strategy (constant) to use `should_exhaust_all_iterators`=True. This is when multi-task condition is false. This was the default behavior before the iteration strategy API update. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/855 Test Plan: run `pytest tests` Reviewed By: vedanuj Differential Revision: D27562857 Pulled By: ytsheng fbshipit-source-id: a9baea12b046ea2affd5f5f205224131941a40ab 06 April 2021, 10:53:48 UTC
8be4a2f [chores] Upgrade to support Pytorch 1.8 (#849) Summary: Upgrading max supported version to PT 1.8.1 and torchvision 0.9.1 Pull Request resolved: https://github.com/facebookresearch/mmf/pull/849 Reviewed By: ytsheng Differential Revision: D27543579 Pulled By: vedanuj fbshipit-source-id: 603199331a3bbf91b99ff110a1145ab3e164ba02 05 April 2021, 23:24:57 UTC
07680c4 [fix] FRCNN Feature extraction for single image (#850) Summary: Fixed single image bug that had incorrect function arguments for extracting features on a single image. Fix: https://github.com/facebookresearch/mmf/issues/848 Pull Request resolved: https://github.com/facebookresearch/mmf/pull/850 Reviewed By: vedanuj Differential Revision: D27547598 Pulled By: brettallenyo fbshipit-source-id: 7bac9aff5521c684a048441cfee619ecb6b84b5e 05 April 2021, 22:17:34 UTC
9a7b75c [feat] Inference CLI (#830) Summary: Created script to allow users to run inference using various models, text inputs, and image inputs. All that is required is using mmf_inference and passing some command line args. Here is how you use it: ``` mmf_interactive checkpoint_path=/checkpoint/brettallen/mmft/model ``` This will initiate an interactive inference script that will ask for image URL and text input to run on. It will keep prompting the user for more images and text until they say `exit`. I also added the ability to just say `same` to use the same image because I figured it was inconvenient for the user to constantly have to copy over the image URL every time they want to ask a new question. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/830 Reviewed By: apsdehal Differential Revision: D27339291 Pulled By: brettallenyo fbshipit-source-id: db190c40626229900a3530da75b61d6e6b63cdd0 05 April 2021, 21:15:34 UTC
99b1f74 [refactor] reporting + meter (#844) Summary: * Clean the API up to prep for moving some of the report/meter updating inside the base_model for pytorch lightning early stopping/checkpointing. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/844 Reviewed By: vedanuj Differential Revision: D27486844 Pulled By: ytsheng fbshipit-source-id: 759fbaccdc1ce2ef2a8e736fa179afeec48b89dc 05 April 2021, 00:31:50 UTC
2379d0c [fixup] add update_registry_for_model to datamodules (#851) Summary: Call `update_registry_for_model` to datamodules to register e.g. answer num. Fix https://github.com/facebookresearch/mmf/issues/847. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/851 Test Plan: tested locally with M4C and M4C-Captioner Reviewed By: apsdehal Differential Revision: D27553712 Pulled By: ronghanghu fbshipit-source-id: 7e5a4092658e8240ad615b0601cdf40d393453fb 03 April 2021, 08:53:24 UTC
7828606 Change MagicMock from return_type to spec Summary: Unblock OSS PyTorch Diff D27327232 ``` class Dataset: pass class IterableDataset(Dataset): pass class NumbersDataset(Dataset): pass d = NumbersDataset() # Prev foo = MagicMock(return_type=c) isinstance(foo, Dataset) # False isinstance(foo, IterableDataset) # False # Now foo = MagicMock(spec=c) isinstance(foo, Dataset) # True isinstance(foo, IterableDataset) # False ``` Reviewed By: ytsheng, vedanuj, apsdehal Differential Revision: D27529078 fbshipit-source-id: 0c6fec0a7379d58dbcd6c4583dc3aed1482f28ab 02 April 2021, 22:19:56 UTC
9d7696f [fix] Use caption only files for localized narratives (#839) Summary: vedanuj. This PR uses smaller caption files. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/839 Reviewed By: vedanuj Differential Revision: D27424834 Pulled By: ytsheng fbshipit-source-id: 3ff4a252fffa700de9e03e880dfa8cf7fadd321b 02 April 2021, 10:33:33 UTC
6f89879 [feat] add tests for eval loop (#835) Summary: * Adds test for evaluation loop for mmf trainer * Makes it so that test folder quality is more explicit in terms of errors. I wrote this test to understand deeper on how the evaluation_loop.py works. This needs to land before the next pytorch lightning update. To test that it works run: `pytest tests` Pull Request resolved: https://github.com/facebookresearch/mmf/pull/835 Reviewed By: vedanuj Differential Revision: D27405061 Pulled By: ytsheng fbshipit-source-id: c1c27fe824ac282d387ba37bb726cdb562f428ef 02 April 2021, 08:59:58 UTC
71554e3 [test] reduce mem leak in tests (#837) Summary: * Fix memory leak in pytest Pull Request resolved: https://github.com/facebookresearch/mmf/pull/837 Test Plan: run `pytest tests` Reviewed By: apsdehal Differential Revision: D27421597 Pulled By: ytsheng fbshipit-source-id: 5edf023ef46fc77c82d0924c9ceb48624fd8c4e3 02 April 2021, 08:57:45 UTC
10e3f45 [feat] add model checkpoints on UniT w/o task embeddings (#831) Summary: Add new pretrained checkpoints of UniT w/o task embedding, which can be evaluated as follows: ``` # on a 8-GPU machine python mmf_cli/run.py \ config=projects/unit/configs/all_8_datasets/shared_dec_without_task_embed.yaml \ datasets=detection_coco,detection_visual_genome,vqa2,visual_entailment,glue_qnli,glue_sst2,glue_mnli_mismatched,glue_qqp \ model=unit \ run_type=val \ training.batch_size=8 \ checkpoint.resume_zoo=unit.all_8_datasets.shared_dec_with_coco_init_without_task_embedding ``` Results: ``` val/detection_coco/detection_mean_ap: 0.3847, val/detection_visual_genome/detection_mean_ap: 0.0331, val/vqa2/vqa_accuracy: 0.6825, val/visual_entailment/accuracy: 0.7407, val/glue_qnli/accuracy: 0.8815, val/glue_sst2/accuracy: 0.8850, val/glue_mnli_mismatched/accuracy: 0.8061, val/glue_qqp/accuracy: 0.9061 ``` Also added pretrained COCO single-task checkpoints to perform COCO initialization experiments. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/831 Test Plan: Tested locally with UniT model Reviewed By: vedanuj Differential Revision: D27528247 Pulled By: ronghanghu fbshipit-source-id: d7e4c8ec337f502b58f4c71f4b29fb6b996df03d 02 April 2021, 06:19:49 UTC
f3d6f6c [mmf_ads] models trained on ads+pages (#843) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/843 MT image+text tables: - `ads_and_pages_for_xlm_processed_v5_with_xray_hash_feature:aml` - `ads_and_pages_for_xlm_processed_v5_with_xray_2048_feature:aml` with same splits as `ads_and_pages_for_xlm_processed_v5:ad_delivery`. We fix tokenizer bug in `bert_processors.py`, where the special tokens for Roberta are `<s>`, `</s>`, `<mask>`, etc, instead of Bert's `[CLS]`, `[SEP]`, `[MASK]`, etc. Besides, the padding index for roberta and bert is 1 and 0 respectively. Add `ads+pages` training and MMFT (hugginface, pytext) supports. Reviewed By: ytsheng Differential Revision: D26440611 fbshipit-source-id: 21e97162aa9f5b2363d2c68a71a20f185b7a8db6 31 March 2021, 22:34:09 UTC
6395711 [fix] Reallow num_workers and pin_memory overrides from training config (#842) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/842 Recent changes for datamodules support moved the options num_workers and pin_memory along with others inside the dataset_config. This diff fixes backwards compatibility and allows specifying the num_workers and pin_memory from training config. Reviewed By: ytsheng, vedanuj, rayhou0710 Differential Revision: D27421166 fbshipit-source-id: 1fff516dcbf6a0f8bb5ab81ca6c477b53b0e4937 31 March 2021, 20:48:30 UTC
03a0527 [feat][1/N]: clip contrastive loss (#162) Summary: Add Contrastive Loss Pull Request resolved: https://github.com/fairinternal/mmf-internal/pull/162 Reviewed By: vedanuj Differential Revision: D27389621 Pulled By: ytsheng fbshipit-source-id: 60424e6c4cd568bdbef55d8f49cb729dc078af7b 30 March 2021, 22:25:17 UTC
29f57ea [refactor] Move test_reporter_config to evaluation.reporter (#838) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/838 Test reporter config as opposed to original design should be a top level config node as it is not specific to one dataset but encompasses all datasets in one go. This diff refactors that to be a top level config node so that it is not per dataset config which conflicts with overall definition of test reporter. Reviewed By: madian9 Differential Revision: D27301920 fbshipit-source-id: 6a990cd23c837fb915398a5930b9e348ff4cd626 30 March 2021, 07:55:36 UTC
a094ad7 [feat] Iteration strategies for multitasking (#822) Summary: This PR adds support for iteration strategies that can be used with multitasking. IterationStrategies as a concept just returns next dataset index to be sampled in each turn. The diff implements multiple of them and makes some sensible assumptions on the defaults. - Always fallback to size proportional sampling for val and test sets - Epoch based strategy only allowed in roundrobin, constant and size proportional. - Adds constant, roundrobin, constant, size proportional and ratios schemes. - constant strategy for single task runs Pull Request resolved: https://github.com/facebookresearch/mmf/pull/822 Reviewed By: vedanuj Differential Revision: D27211249 fbshipit-source-id: bce14a44730bdd830a72f4e72c350211e088c8e8 30 March 2021, 03:40:32 UTC
542694f [feat] Add teardown support for datamodules (#834) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/834 Without proper teardown, the job might fail as errored and restart. This diff adds proper teardown support for datamodules which inherently will include onbox dataloader as well. Reviewed By: ytsheng, vedanuj Differential Revision: D26687357 fbshipit-source-id: 8cebc7f49055cea6906cb367b539fc4073666493 29 March 2021, 17:04:37 UTC
12650f5 [feat,refactor] Support datamodules directly in dataset loader (#782) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/782 This diff refactors MMF to support datamodules directly. Reviewed By: ytsheng, vedanuj Differential Revision: D26481038 fbshipit-source-id: 6a3e36fe50a30c44f473098152e604962c2f4f8e 27 March 2021, 09:02:20 UTC
2d29089 [MMF][feat] Add label smoothing cross entropy loss Summary: Add label smoothing cross entropy in loss function Differential Revision: D27092731 fbshipit-source-id: 66b6cf2bf04a2324b7d6f36d90f4a1ebb1243a35 26 March 2021, 22:18:55 UTC
e12e03d [fix] QoL changes to support onbox (#155) Summary: Pull Request resolved: https://github.com/fairinternal/mmf-internal/pull/155 Pull Request resolved: https://github.com/facebookresearch/mmf/pull/827 Some of the original monkey patching doesn't work with onbox dataloader inside processors. Also, sets some env variables to support distributed onbox setting. Reviewed By: ytsheng, vedanuj Differential Revision: D27306251 fbshipit-source-id: 135b320cf3a585413a8902ee6cd0f67a58ec64d7 26 March 2021, 17:51:02 UTC
5c5c356 [chores] Add hateful memes config for MMF Transformer (#828) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/828 This is being used in our getting started example but is missing, so adding. Reviewed By: ytsheng, vedanuj Differential Revision: D27306253 fbshipit-source-id: 40407235e0c6feddc556efeb5af4ecda916339a8 26 March 2021, 17:35:52 UTC
e7ad822 [feat] Hateful Memes fine grained (#156) Summary: Pull Request resolved: https://github.com/fairinternal/mmf-internal/pull/156 Pull Request resolved: https://github.com/facebookresearch/mmf/pull/829 hateful memes fine grained Reviewed By: ytsheng, apsdehal Differential Revision: D26490349 fbshipit-source-id: 670698aefd13fa0fae4d61174fe669e86ac5f7fe 25 March 2021, 22:50:12 UTC
3f1bcf4 [refactor] Collator samplelist conversion logic for more control (#826) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/826 This refactor allows us to use sample list conversion logic used in BatchCollator elsewhere as well. Reviewed By: vedanuj Differential Revision: D27306252 fbshipit-source-id: a9a89388e760d0b23c729f3ac43399df20fc7088 25 March 2021, 05:11:56 UTC
e88d059 [postray] Add fblearner flows (#153) Summary: Pull Request resolved: https://github.com/fairinternal/mmf-internal/pull/153 - Create flows for postray to avoid remaining dependant on faim flows - Extend path finder to search for user dir Reviewed By: rayhou0710 Differential Revision: D27040702 fbshipit-source-id: c1b166cb3b8775f25879cbe405435550478b81b7 25 March 2021, 03:36:40 UTC
9588752 [feat] Inherit from PL datamodule for dataset builders (#825) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/825 After this change dataset builder will inherit from PL datamodule as at the high level both concepts are same. BaseDatasetBuilder has been adjusted to also support datamodule functionality directly. Reviewed By: ytsheng, vedanuj Differential Revision: D26505873 fbshipit-source-id: f3e1393f65bf25a2ec7161a5ef2e450c98a192e0 25 March 2021, 03:29:25 UTC
19f3211 [feat] add images to localized narratives (#823) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/823 Reviewed By: vedanuj Differential Revision: D27306005 Pulled By: ytsheng fbshipit-source-id: 1626f2e8762138744130fdc343d3261095293100 24 March 2021, 22:07:58 UTC
7699ff0 [feat] Inference API (#798) Summary: Added an API to run inference in these use cases: - region features -> mmft - region features -> visual_bert Based on configs, some are provided here, users can run inference on various trained models with something as simple as an image URL and a text query. Would love for people to take a look and provide feedback about my coding style and design choices. If you want to run it on your own you can pull and run ``` from mmf.utils.inference import Inference if __name__ == "__main__": inference = Inference(checkpoint_path="/checkpoint/brettallen/visualbert") answer = inference.forward( "http://i.imgur.com/1IWZX69.jpg", {"text": "what type of shoes is the woman in pink wearing"}, image_format="url", ) print(answer) ``` Pull Request resolved: https://github.com/facebookresearch/mmf/pull/798 Reviewed By: vedanuj Differential Revision: D27171794 Pulled By: brettallenyo fbshipit-source-id: 25b51e5da8cdae944b53970ce1a30b253dee339f 24 March 2021, 20:18:15 UTC
800a086 <feat> Refactor MMF Test Reporter and add Hive Exporter (#150) Summary: Pull Request resolved: https://github.com/fairinternal/mmf-internal/pull/150 - Modifies test reporter to be fetched/registered in registry - Add hive test reporter for internal support Reviewed By: apsdehal Differential Revision: D26954690 fbshipit-source-id: b8ad088d829a5353c713cb493c38f27099b43fcd 24 March 2021, 03:23:02 UTC
e5edc48 [fix] Fix iopath get_local_path related checkpoint issues (#817) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/817 Adds force=True for downloading manifold checkpoints so that we do not load cahced versions of the checkpoints like best.ckpt or current.ckpt Reviewed By: apsdehal Differential Revision: D27130415 fbshipit-source-id: 21546b6be43cf87bc37ecb0842fc6321b678bcbf 22 March 2021, 23:00:03 UTC
b752db6 [fix] Do not run validation if final val not in run_type (#816) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/816 Adding a check to final validation to run only if val is in run_type Reviewed By: ytsheng, apsdehal Differential Revision: D27130474 fbshipit-source-id: 2793a1dd3f77d4d56d737781a68973634d271157 19 March 2021, 23:52:20 UTC
62a50f1 [fix] tests (pytest + black) (#149) Summary: skip fb tasks on devfair pytest Pull Request resolved: https://github.com/fairinternal/mmf-internal/pull/149 Reviewed By: apsdehal Differential Revision: D27185785 Pulled By: ytsheng fbshipit-source-id: 1e88b76607fbf86a67a87ea601ce8a2c35197499 19 March 2021, 22:31:00 UTC
3ba4725 [fix] length for multi dataset loader; max_epochs; eta (#820) Summary: The calculation of length for multidataloader used get_batch_size to divide total dataset length which is incorrect as get_batch_size is per device rather than global batch size. This PR fixes it and fixes snapshot interval calculation as well. This in turn: - Fixes max_epochs support - ETA - All other things dependent on this Pull Request resolved: https://github.com/facebookresearch/mmf/pull/820 Test Plan: Tested locally with MVLT runs Reviewed By: ytsheng, madian9 Differential Revision: D27184804 Pulled By: apsdehal fbshipit-source-id: d18aeb52b7e280f33c3b9e7509dafa123ed1c629 19 March 2021, 22:18:53 UTC
08fb370 [refactor] Fix typings used from mmf common/typings Summary: Currently, typings used in multiple places in MMF from common/typings are incorrect. This diff fixes them. Reviewed By: ytsheng Differential Revision: D27127754 fbshipit-source-id: fccbb5df0a7ffac2f12e73a9d47e369fb6b7a4d0 18 March 2021, 23:00:10 UTC
7fb6bdc [feat] Allow returning sequences in transformer encoder (#814) Summary: - For some cases such as MLM we need full sequences. It would be great if we can reuse existing transformer encoder and support that. This PR adds support for the same along with tests Pull Request resolved: https://github.com/facebookresearch/mmf/pull/814 Test Plan: Tests have been added. Tested also with MVLT Reviewed By: ytsheng, vedanuj Differential Revision: D27075345 Pulled By: apsdehal fbshipit-source-id: c8d475405d4950494831846f2eef795975e5ff6c 18 March 2021, 21:31:54 UTC
bbc8035 [feat,fix] Make some transformer head params optional; label key for MLM (#813) Summary: This PR makes some QoL changes for transformer heads so that they can be used at places other than MMFTransformer. - Make encoder_layers and processed_sample_list options optional by default - Add label key option for mlm to allow direct fetching of maskedlabels from sample list Pull Request resolved: https://github.com/facebookresearch/mmf/pull/813 Test Plan: Tested with GUniT Reviewed By: ytsheng, vedanuj Differential Revision: D27062330 Pulled By: apsdehal fbshipit-source-id: 3f7aed573b65154960a18dffb4ca6600c0d4bb34 18 March 2021, 20:17:11 UTC
8f9150b [fix] Allow running slurm scripts from directory other than mmf (#818) Summary: - Currently, hardcoded to be run only from the same directory as mmf - This PR fixes it so that it can be launched from anywhere Pull Request resolved: https://github.com/facebookresearch/mmf/pull/818 Test Plan: Tested with MVLT Reviewed By: ytsheng Differential Revision: D27136433 Pulled By: apsdehal fbshipit-source-id: cfa0cb2696a7547c1a299ee9790eaa8fd9dbd307 18 March 2021, 00:06:58 UTC
7cc0e4e [mmf] Update gradient clipping test to use almost equals for float comparison (#147) Summary: Pull Request resolved: https://github.com/fairinternal/mmf-internal/pull/147 Reviewed By: ytsheng Differential Revision: D26783077 fbshipit-source-id: 65c278e68d25736ed89c9a1669aa5f401e0548f6 17 March 2021, 17:49:54 UTC
c672d08 [feat] add the UniT model and supporting utils (#741) Summary: This PR is built upon https://github.com/facebookresearch/mmf/pull/740 - add the UniT model - add `AdamWSkipParamsWithZeroGrad` optimizer (skips unused params) - provide dataset zoo download for VQAv2 splits w.r.t. COCO 2017. - provide model zoo download for UniT. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/741 Test Plan: Tested locally and verified the outputs --- Evaluating the UniT model zoo entry ``` # on a 8-GPU machine python mmf_cli/run.py \ config=projects/unit/configs/all_8_datasets/shared_dec.yaml \ datasets=detection_coco,detection_visual_genome,vqa2,visual_entailment,glue_qnli,glue_sst2,glue_mnli_mismatched,glue_qqp \ model=unit \ run_type=val \ training.batch_size=8 \ checkpoint.resume_zoo=unit.defaults ``` Evaluation outputs on the 8-dataset model: ``` val/detection_coco/detection_mean_ap: 0.3899, val/detection_visual_genome/detection_mean_ap: 0.0329, val/vqa2/vqa_accuracy: 0.6696, val/visual_entailment/accuracy: 0.7316, val/glue_qnli/accuracy: 0.8790, val/glue_sst2/accuracy: 0.8922, val/glue_mnli_mismatched/accuracy: 0.8090, val/glue_qqp/accuracy: 0.9065 ``` Reviewed By: vedanuj, apsdehal Differential Revision: D26894259 Pulled By: ronghanghu fbshipit-source-id: b548313f724d61c2c6e38c2cba1ef19cd735dfa9 17 March 2021, 01:31:59 UTC
f2e45f7 [fix,feat] Support more wider variety of user dirs (#809) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/809 This PR handles some edge cases around user dirs which weren't handle before especially in cases where python files are compiled and moved to a different place. This different place can also have compile time generated modules which are not available directly to the original folder. The diff also handles support for specifying a python file as user dir input. Lastly, this diff adds extensive test to cover and test various user dir configurations. Reviewed By: ytsheng, vedanuj Differential Revision: D26838780 fbshipit-source-id: 38e4ffaf55053df0b29ff682b26bb4ae5b6638ac 12 March 2021, 00:18:24 UTC
60c9138 [fix] Fix memory leak in tests (#806) Summary: Fixing some memory leak in tests. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/806 Test Plan: Multiple re-runs of tests show no failure. Reviewed By: ytsheng, apsdehal Differential Revision: D26952871 Pulled By: vedanuj fbshipit-source-id: 0dc91b5f497dd234b25671c105afce788797dcb3 11 March 2021, 11:41:54 UTC
6210494 <fix> support providing configs that contain equal character (#808) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/808 The current parser would fail if the opt value has `=` which is needed when providing filters. This diff takes the first occurrence of `=` as the separator Reviewed By: apsdehal Differential Revision: D26955390 fbshipit-source-id: cedfb358de254a0c6d2a88744a0660984b045f47 11 March 2021, 03:15:10 UTC
c78a408 [fix] Fix MMFT for loading older checkpoints, add tests and assertions (#805) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/805 Fix MMFT for loading older checkpoints after head module refactor. Also adds a test to catch these errors in future. Reviewed By: ytsheng Differential Revision: D26924574 fbshipit-source-id: 09fa22b1b922a6b3d1698f0fe545d826a1bfb5c6 10 March 2021, 23:42:54 UTC
9a93bc4 Bump elliptic from 6.5.3 to 6.5.4 in /website (#800) Summary: Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/indutny/elliptic/commit/43ac7f230069bd1575e1e4a58394a512303ba803"><code>43ac7f2</code></a> 6.5.4</li> <li><a href="https://github.com/indutny/elliptic/commit/f4bc72be11b0a508fb790f445c43534307c9255b"><code>f4bc72b</code></a> package: bump deps</li> <li><a href="https://github.com/indutny/elliptic/commit/441b7428b0e8f6636c42118ad2aaa186d3c34c3f"><code>441b742</code></a> ec: validate that a point before deriving keys</li> <li><a href="https://github.com/indutny/elliptic/commit/e71b2d9359c5fe9437fbf46f1f05096de447de57"><code>e71b2d9</code></a> lib: relint using eslint</li> <li><a href="https://github.com/indutny/elliptic/commit/8421a01aa3ff789c79f91eaf8845558a7be2b9fa"><code>8421a01</code></a> build(deps): bump elliptic from 6.4.1 to 6.5.3 (<a href="https://github-redirect.dependabot.com/indutny/elliptic/issues/231">https://github.com/facebookresearch/mmf/issues/231</a>)</li> <li>See full diff in <a href="https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=elliptic&package-manager=npm_and_yarn&previous-version=6.5.3&new-version=6.5.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookresearch/mmf/network/alerts). </details> Pull Request resolved: https://github.com/facebookresearch/mmf/pull/800 Reviewed By: vedanuj Differential Revision: D26890681 Pulled By: apsdehal fbshipit-source-id: 063737b8ef957f3e67edcc749b83660bd386a01b 10 March 2021, 02:45:46 UTC
ff40099 [feat] First e2e test with emphasis on user dir (#609) Summary: This PR introduces first e2e test which uses `mmf_cli.run` programmatic API and log parsing to check for log file. Specifically in this PR we test for user_dir import by creating our own simple model and a dataset that always generate one. For a more friendly `user_dir` support, now we override default config in configuration with user_cmd_opts as well so that MMF can discover configs relative to user dir if needed. We run the usual run command and expect the model to overfit and always return 1. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/609 Test Plan: Tested locally on devfair using `pytest -v ./tests`. Reviewed By: vedanuj Differential Revision: D24130662 Pulled By: apsdehal fbshipit-source-id: cde12cc5f8cdbb317797adf374f9cd1c4637d4ab 09 March 2021, 18:48:56 UTC
413510f [feat] detection datasets (COCO, Visual Genome) and mAP metric (#740) Summary: This PR is built upon https://github.com/facebookresearch/mmf/pull/739 - add `detection_coco` dataset - add `detection_visual_genome` datasets - add supporting detection utilities - add `detection_mean_ap` metric - add `DETRImageAndTargetProcessor` to load DETR image and box transforms Pull Request resolved: https://github.com/facebookresearch/mmf/pull/740 Test Plan: Tested locally and verified the outputs Reviewed By: vedanuj, apsdehal Differential Revision: D26765951 Pulled By: ronghanghu fbshipit-source-id: c908e4764656158c688f210c3c0a62add7977417 08 March 2021, 19:19:32 UTC
82a158e [feat] Make converting avgpool to Identity optional (#799) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/799 **Create a new diff to fix export to GitHub issue in D26781527** This diff makes convert avgpooling to Identity optional such that an image can be encoded as single embedding to be used as a token instead of feature maps for multiple tokens. Reviewed By: madian9 Differential Revision: D26870914 fbshipit-source-id: 07fc8228a203ec1a532b521df53d005c0e61589b 06 March 2021, 23:33:36 UTC
788e810 [fix] pytorch 1.8 updates with rfft and irfft (#797) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/797 Reviewed By: vedanuj Differential Revision: D26840004 Pulled By: ytsheng fbshipit-source-id: 15ff847a5a0b13537d24fdddcb5e5d33166e6eb7 06 March 2021, 10:02:46 UTC
853ac08 [feat] Image text alignment/retrieval model+dataset on flickr30k (#796) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/796 Pull Request resolved: https://github.com/fairinternal/mmf-internal/pull/143 Refer to Shir's diff D23716331 It is a subset of his diff, just the alignment part without RAG. Run f225045496, r@1_retrieval: 0.6310, r@5_retrieval: 0.8700, r@10_retrieval: 0.9250 r@1_rev_retrieval: 0.5022, r@5_rev_retrieval: 0.7870, r@10_rev_retrieval: 0.8632 Result reported in the paper r@1_retrieval: 0.651, r@5_retrieval: 0.873, r@10_retrieval: 0.926 r@1_rev_retrieval: 0.506, r@5_rev_retrieval: 0.788, r@10_rev_retrieval: 0.867 Running shir's code on FAIR dev machine r@1_retrieval: 0.6290, r@5_retrieval: 0.8620, r@10_retrieval: 0.9210, r@1_rev_retrieval: 0.4944, r@5_rev_retrieval: 0.7852, r@10_rev_retrieval: 0.8620 Updated run f253273762 Reviewed By: ytsheng, vedanuj, apsdehal Differential Revision: D24321055 fbshipit-source-id: 238ce5a98d82fc05cb5f826df535ddfe612b43fe 06 March 2021, 00:53:09 UTC
5f9bf6e [feat] Decouple transformer head module (#778) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/778 This PR separate heads from dependencies with the trunk, allowing us to add any number of heads/pretraining objectives without modifying the model code and purely through configs. - No model code need to be modified to add a new head - Several heads can be added to a single model. Useful when we want to try several pretraining objectives or several losses based on different heads - Since the heads are decoupled from the model trunk, these can be utilized with other models as well, bringing in more modularity and flexibility. - All head specific parameters and logic will be confined to the head nn.Module - Loss calculation can happen in the head as well as at the model level, no change in behavior here - Added tests for different heads Performance Improvements: - MLM head is now made memory efficient by projecting only the masked tokens Reviewed By: apsdehal Differential Revision: D26310387 fbshipit-source-id: 0699795b266f1c2301f63a929160b58133b9d943 05 March 2021, 20:52:56 UTC
ef8b0f9 [fix] move batch to current device in eval (#795) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/795 Pull Request resolved: https://github.com/fairinternal/mmf-internal/pull/142 to address an issue seen by AICommerce. https://fb.workplace.com/groups/574291956570984/permalink/700657133934465/ Reviewed By: apsdehal Differential Revision: D26808859 fbshipit-source-id: 25acdf7a9677c769490e80be48921ca4df6777c9 04 March 2021, 18:31:12 UTC
163c202 [feat] multitask support: per-dataset evaluation loop, metrics, and sampling ratios (#739) Summary: This PR is built upon https://github.com/facebookresearch/mmf/pull/736 - change the current evaluation loop (that runs on the union of all datasets) to per-dataset evaluation. - generate prediction JSON object during evaluation loop, which can be consumed by metrics that evaluate the entire dataset (e.g. mAP for object detection or CIDEr for image captioning) and cannot be expressed as averaging over per-batch metrics - run metrics on a subset of datasets with (optional) `datasets` config - allow specifying per-dataset sampling ratio for multi-task training Pull Request resolved: https://github.com/facebookresearch/mmf/pull/739 Test Plan: Tested locally and verified the outputs --- Example on specifying per-dataset metric with `datasets` (here `vqa_accuracy` will only run on vqa2 while `detection_mean_ap` will only run on detection_coco and detection_visual_genome). If `datasets` is not specified, the default behavior is to run on all dataset: ``` evaluation: metrics: - type: vqa_accuracy datasets: - vqa2 - type: detection_mean_ap datasets: - detection_coco - detection_visual_genome ``` --- Examples specifying per-dataset sampling ratio during training through `multitasking.enabled` and `multitasking.sampling_ratios`: ``` multitasking: enabled: true sampling_ratios: detection_coco: 0.2 detection_visual_genome: 0.07 visual_entailment: 0.12 vqa2: 0.26 glue_qnli: 0.1 glue_mnli_mismatched: 0.1 glue_qqp: 0.1 glue_sst2: 0.05 ``` Reviewed By: apsdehal Differential Revision: D26709926 Pulled By: ronghanghu fbshipit-source-id: c6c0ebcdda5750890ffd4f93bcc909d9a39e257e 02 March 2021, 17:55:11 UTC
5246609 [feat] add visualization API and notebook (#766) Summary: Add a visualization API for the frcnn features, which takes in image and feature paths and uses the huggingface visualization tools to show the image. Also added a jupyter notebook that will display the images accordingly if the features and images are in the correct place. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/766 Reviewed By: vedanuj Differential Revision: D26621835 Pulled By: brettallenyo fbshipit-source-id: a31e1a3da499c4044d6cf275b281ab5e4b0b720d 01 March 2021, 22:53:16 UTC
52a63d3 [feat] Sharded DDP (#759) Summary: Adding ShardedDDP implementation - Activates ShardedDDP when Optimizer State Sharding(OSS) is enabled. - Works with both FP16 and FP32 - Requires fairscale to be installed Pull Request resolved: https://github.com/facebookresearch/mmf/pull/759 Test Plan: MMF Transformer VQA accuracy 44k iters (512 batch size): FP16 + OSS ShardedDDP + ShadedGradScaler : 65.87, mem: 17573.0 MB FP16 : 65.56, mem : 19032.0 MB OSS ShardedDDP: 65.90 , mem : 21073.0 MB Reviewed By: ytsheng, min-xu-ai Differential Revision: D26177429 Pulled By: vedanuj fbshipit-source-id: abce18d88e7ac4125a2dcd7ee40153e163835b34 28 February 2021, 01:46:10 UTC
5c75d69 [feat] GLUE datasets from Hugginface datasets library (#736) Summary: - Uses single interface to load 4 GLUE Datasets - Currently, only adds 4 datasets needed by UniT, can be extended easily to more - Specify as `glue_qnli`, `glue_mnli_mismatched` etc. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/736 Test Plan: Tested locally and verified the outputs Reviewed By: ytsheng, ronghanghu Differential Revision: D25942348 Pulled By: apsdehal fbshipit-source-id: 83b86f0946df162a6253726daa075630b8533a2a 27 February 2021, 03:56:26 UTC
33bac8f [perf] use PathManager.get_local_path for loading checkpoints (#789) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/789 Switching to use PathManager.get_local_path instead of directly loading from Manifold to improve stability Reviewed By: vedanuj Differential Revision: D26668375 fbshipit-source-id: 828bd5a49cc03ca2c96c3ca5db93c3b144903eb8 25 February 2021, 19:21:12 UTC
2006e90 [sdoc] Update static docs plugin on all sites Summary: Just a codemod to update everyone to the latest version. Created by running on devserver: ``` cd fbsource/xplat/staticdocs ./update-all-users 0.7.0 ``` Notable features: * No longer need to import FbInternalOnly or OssOnly, theyre already in scope and ready for use in markdown files. * Can now specify a baseDir for all code references to be evaluated relative to. Reviewed By: mweststrate Differential Revision: D26632914 fbshipit-source-id: 6f5ac7316ee23bc8f3b791782cd0509afe909afc 25 February 2021, 11:41:38 UTC
f22814f [feat] Add PathManager support for lmdb_conversion script (#787) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/787 Adds support for PathManager to lmdb_conversion script so lmdbs can be extracted to PathManager registered paths as well. Reviewed By: vedanuj Differential Revision: D26642096 fbshipit-source-id: 3fa12bf1299750e89e1f4f24daf1c471c7ef3012 25 February 2021, 00:32:32 UTC
867916a [fix] Fix imports for FB specific files (#138) Summary: Pull Request resolved: https://github.com/fairinternal/mmf-internal/pull/138 Fix internal imports so that we can the code from mmf-internal in FAIR cluster. Fix all tests to run on mmf-internal Fix black/isort mismatches Add missing init files to FB folders Reviewed By: apsdehal Differential Revision: D26478270 fbshipit-source-id: 291f61b25bb5ba1755e5a5f211231471e86ea8b4 24 February 2021, 18:12:20 UTC
8409361 [feat] Add feature extraction script (#764) Summary: Add a feature extraction script that uses Huggingface's Fast RCNN structure and code to discover features in an image. `extract_features_frcnn.py` is my script, the other files were taken from Huggingface, other than super minor changes by me, including rotating the RGB/BGR values in the preprocessing script. The script takes a number of flags that alter it's behavior like exclude files, input files, output files, batch size, etc. Run `python3 mmf/tools/scripts/features/frcnn/extract_features_frcnn.py --model_file model.bin --config_file config.yaml --image_dir ./example_images --output_folder ./output_features` Pull Request resolved: https://github.com/facebookresearch/mmf/pull/764 Reviewed By: vedanuj Differential Revision: D26612531 Pulled By: brettallenyo fbshipit-source-id: aed9e127d9e102b2704cadd131e80bd594bce28e 23 February 2021, 23:54:53 UTC
f5ff2c8 [fix] Improvement to VocabDict loader (#786) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/786 Upstream callers to VocabDict tend to pass `data_dir` which leads to inadverently concating it with the vocab_file path. We now skip this step if the path already exists Reviewed By: apsdehal Differential Revision: D26601097 fbshipit-source-id: 6d9006c66d2e6ebef503ba0f8fc43b16a4d21550 23 February 2021, 20:10:05 UTC
0837776 [mmf][PostRay] Make capability as an arg Summary: To make capability as an arg so its easier to switch between V100-16GB and 32GB cards. Reviewed By: madian9, vedanuj, apsdehal Differential Revision: D26600874 fbshipit-source-id: b4f95c09a611fb46101cbd2043f132b1d53eb67e 23 February 2021, 17:36:44 UTC
6db9048 [refactor, fix] Fix fbl flow to use iopath, some cleanup (#785) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/785 Some cleanup of file_io file Reviewed By: apsdehal, BruceChaun Differential Revision: D26599901 fbshipit-source-id: 1979248b54ec0d5b2566d158cae4a72028b1f116 23 February 2021, 04:56:33 UTC
b1fd2a9 [refactor] Refactor output type of MMFT preprocess_output (#781) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/781 - Refactors the output type to be Dict[str, Dict[str, Tensor]] - Namedtuples cannot be inherited to include new fields easily - Dataclasses are not scriptable Reviewed By: apsdehal, xuefeicao Differential Revision: D26479261 fbshipit-source-id: d64b116fadc1cdb314e0cd66189bde54d11dc2f6 19 February 2021, 05:08:02 UTC
bb6a9b7 [mmf][site] Upgrade Docusaurus Summary: To use FbInternalOnly, you need to be on Docusaurus 61+, this upgrades it. It also fixes a typo FBInternalOnly -> FbInternalOnly. MDX currently silently (with a warning) accepts components that haven't been imported, so this wasn't raising an error but wasn't doing anything either. Also fixes a few broken links (the new version of docusaurus checks this for you and enforce them). Reviewed By: apsdehal Differential Revision: D26510193 fbshipit-source-id: 81871d3151edce27a2281cbcaaa7e694309205a2 18 February 2021, 19:33:46 UTC
99f8010 [feat] Add batch_size_per_device training option (#780) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/780 This will allow specifying batch size per device instead of default global batch size. If specified using `training.batch_size_per_device`, this will supersede the value specified in `training.batch_size` and information will be logged. Reviewed By: madian9, vedanuj Differential Revision: D26480897 fbshipit-source-id: 9ffb3d9b79a84c39db4000e6a3d051e3bd1b6eb5 17 February 2021, 22:54:16 UTC
daeaa95 [fix] Don't show warning for missing is_xla in registry (#779) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/779 The warning is plaguing the logs and should not be explicitly registered. This diff fixes that. Reviewed By: ytsheng Differential Revision: D26480670 fbshipit-source-id: 9c7d0a67a1cd8fa71d8c7537eeff75c107c1117b 17 February 2021, 18:04:42 UTC
ea71345 [fix] Fix SPM Tokenizer for masked labels (#775) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/775 Fix masked SPM tokenizer inherited from MaskedBertTokenizer Differential Revision: D26432162 fbshipit-source-id: f0acb2388c4030c48573ec68b8ff6ab4e9ecd99c 16 February 2021, 17:51:22 UTC
53ee8d8 [feat] Changes to support training on TPUs (#752) Summary: Creating this new PR since pytorch-xla branch is in use for an ongoing project. I have incorporated most of the changes understood from the last comments on https://github.com/facebookresearch/mmf/pull/693 Happy to follow up on the open comments here. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/752 Reviewed By: vedanuj Differential Revision: D26218782 Pulled By: apsdehal fbshipit-source-id: 6ce6e48134153cea9e9969acac021cf2bf955fe6 12 February 2021, 22:15:46 UTC
18d685d [refactor,tests,fix] Clean up and fix a bug in MMFT; add extensive tests (#774) Summary: The diff address a bug that was introduced in text position ids by a recent change in https://github.com/facebookresearch/mmf/issues/760. The fix is to actually make single feature dim modalities B X 1 X D before passing to backend instead of making multiple assumption in backend layer which tend to be conflicting with text input ids. This also adds some comments to better explain stack version of text. The PR also refactors MMFT to be more readble and reduce cyclomatic complexity. Finally, this PR adds extensive tests to make sure a change like https://github.com/facebookresearch/mmf/issues/760 doesn't break MMFT again. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/774 Test Plan: Adds extensive tests for MMFT Tested disney's model. Reviewed By: ytsheng Differential Revision: D26410408 Pulled By: apsdehal fbshipit-source-id: 059af500739b3463219b8594b3bb72001326a0a2 12 February 2021, 20:30:49 UTC
95a2225 [docs] Update internal docs to latest Summary: Updates fblearner and devserver docs to point to latest content. Reviewed By: ytsheng Differential Revision: D25511541 fbshipit-source-id: 58ba9ff19a294c5c419baad50e18d2b3ed1013d7 11 February 2021, 22:04:01 UTC
2ff0062 [feat] Add MLM pretraining head for MMF Transformer (#769) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/769 1. Adds a MLM pretraining head for MMF Transformer model 1. Fixes `MultiSentenceBertTokenizer` to also support multisentence masking 1. Adds `mlm_labels_list` preprocessing 1. Adds pretraining head specific postprocessing Note : This is not the best way we can add pretraining losses and heads, but we should tackle it properly when we start working on Pretraining Schemes support for MMFT and other models. Facebook : 1. Fixes dataset filtering to support the case when no `set_name_mapping` is available for a dataset 1. Fixes `FeaturesWithTextBatchProcessor` when no labels are available for a dataset 1. Fixes `MultiSentenceSPMTokenizer` to also support multisentence masking Reviewed By: apsdehal Differential Revision: D26270908 fbshipit-source-id: 84a1ae462aea8fda6e6b0c791fad7722a69dbfb2 09 February 2021, 18:39:19 UTC
0ee1127 [feat] PL mvp0: training (#748) Summary: * pytorch lighting stub mostly involving training * Tests for lightning trainer included * built on top of the mmf grad accumulation fix: https://github.com/facebookresearch/mmf/pull/747 - [X] MVP 0. Training: Goal - Train a model from scratch and reach similar accuracy as using mmf_trainer - [X] Setup the training pipeline: done - [X] Training on the right device: done - [X] Clip gradients: done - [X] Optimizer: done - [X] FP16 Support: done - [X] LR scheduler (incl. warmup etc): done - [X] testcase: train visual_bert on vqa from scratch fo 10 iterations, compare the value: done - [x] tests included in this PR (tests are only done for pytorch lightning integration): - [X] Vanilla Training w/o grad accumulate, make sure loss for 5 iters are the same between mmf and pl - [X] Optimizer working as intended as a part of this PR. - [X] `max_updates` and `max_epochs` calculation - [x] Training with grad accumulate - [x] Training with LR schedule achieves a different value compared to without LR schedule - [x] Training with LR schedule for PL is the same as training with LR schedule for `mmf_tranier` - [x] Training with gradient clipping make sure all grads are within the `grad_clipping` threshold - [x] Training with gradient clipping is the same as training with gradient clipping for `mmf_trainer` Pull Request resolved: https://github.com/facebookresearch/mmf/pull/748 Reviewed By: apsdehal, simran2905 Differential Revision: D26192869 Pulled By: ytsheng fbshipit-source-id: 203a91e893d6b878bbed80ed84960dd059cfc90c 08 February 2021, 10:52:20 UTC
fc72ef0 [fix] fix typo in model zoo config (#715) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/715 Reviewed By: vedanuj Differential Revision: D25553078 Pulled By: ytsheng fbshipit-source-id: e24989d7118b0de3e92a381182a1a7fe4b540bc6 06 February 2021, 04:17:31 UTC
d49abdf [sdoc][codemod] Fix cert dialog popup on open-source sites Summary: Upgrades the FB-internal documentation plugin, to no longer call the internal api that requires auth, for external viewers. Context: https://fb.workplace.com/groups/654274975334601/permalink/1288672008171584/ Reviewed By: justintrudell Differential Revision: D26252469 fbshipit-source-id: 31068534ce79a7959c38c6e66e6a9cf12371e228 04 February 2021, 19:48:55 UTC
bfacca4 [feat] Changes to support bento notebook tutorial (#761) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/761 This diff aims to fix various things in MMF to provide an optimal bento notebook experience. - Fix some hasattr checks to "in" checks - Allow empty config_path for datasets and models - Also, allow missing model key or dataset key in yaml configs - Adds dataclass for LossConfig so as Losses can be initialized in the model through structured configs - Fix the usage of next(model.parameters()) to get the device. This doesn't work with dataparallel - Also, using arbitrary keys with text and image modality type. MMFT will now expect to find these in SampleList. - Allow passing `input_mask` as `modality_mask` for text type Reviewed By: vedanuj Differential Revision: D26170013 fbshipit-source-id: 7af3766ffcf50acc9d5d69dd1eb91da224e0783c 02 February 2021, 09:32:36 UTC
5b01c32 [feat] Support direct feature inputs with single position dim in MMFT (#760) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/760 This diff allows MMFT to support direct features which don't use any encoders are of position dim==1. Also, uses BertModelJit to initialize the transformer base so that it is torchscriptable. Reviewed By: vedanuj Differential Revision: D24555077 fbshipit-source-id: ee9be44fed10ba30f1a88437ec42a01f38952347 02 February 2021, 07:11:17 UTC
28f1a81 [feat] Add config dataclasses for MMFT (#658) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/658 - Adds base dataclasses for MMFT and related encoders if something is missing - Fix usage of EncoderFactory with enums in build_model - Adds extensive test for building the model with the configs - Adds defaults to the configs as well based on the original configs - In second set of changes, need to isolate backend configs. Reviewed By: vedanuj Differential Revision: D24469282 fbshipit-source-id: c2e752e163c23b9d1142bbe2fd0b45553f33dc07 02 February 2021, 07:11:17 UTC
b8f4591 [fix] Fix accumulate tensor fields in evaluation (#757) Summary: Fixes evaluation loop after changes in https://github.com/facebookresearch/mmf/issues/747 Pull Request resolved: https://github.com/facebookresearch/mmf/pull/757 Reviewed By: ytsheng Differential Revision: D26171041 Pulled By: vedanuj fbshipit-source-id: f0fd24ef96ef54dd7ea17af5968e05f0301e64a3 01 February 2021, 09:52:13 UTC
8237ed2 [fix] Fix windows build for iopath dependency (#758) Summary: Fixes Windows build after it was broken due to iopath dependency inclusion. Latest version of pywin is not compatible with python3.8, so we need to fix it at v225. Reference : [issue](https://github.com/mhammond/pywin32/issues/1431). Pull Request resolved: https://github.com/facebookresearch/mmf/pull/758 Reviewed By: ytsheng Differential Revision: D26171059 Pulled By: vedanuj fbshipit-source-id: 332281c7987a8ba9cdb4cc3ec38f23476a2af146 01 February 2021, 08:15:45 UTC
11b531e [fix] fix gradient accumulation when update_frequency != 1 (#747) Summary: * fix gradient accumulation when update_frequency is not equal to 1 * The issue is caused by "start_update" being called at an irregular time so the gradients are actually not being accumulated in between update_frequency. When optimizer's `zero_grad` is called, grad is manually set to zero and therefore the gradients are not being accumulated. This fix made it so that `zero_grad` is called in the correct interval so that grad are being accumulated in between update_frequency. * fix `combined_report` not taking into account the new losses causing metrics calculation to be incorrect. * add test (including logging) * add test to make sure there is a final update even if the num batches from the current update < update frequency. * address issue: https://github.com/facebookresearch/mmf/issues/626 Pull Request resolved: https://github.com/facebookresearch/mmf/pull/747 Reviewed By: apsdehal Differential Revision: D26034213 Pulled By: ytsheng fbshipit-source-id: fa0c7ad3566ce30f89b67996ac476a3d2dab779a 30 January 2021, 03:13:11 UTC
77a931e [enhancement] replace usage of PathManager to use ioPath (#749) Summary: Replace code in file_io to use the new ioPath Path Manager instead of fvcore. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/749 Test Plan: - use existing `test_file_io.py` test suite Reviewed By: vedanuj Differential Revision: D26058703 Pulled By: brettallenyo fbshipit-source-id: 148aa502a2daed9c8ea44f38235dd19b168b8c54 27 January 2021, 23:50:40 UTC
b0e6c4a [feat] Add generic TorchvisionResnetImageEncoder in ImageEncoderFactory. (#728) Summary: This PR adds a generic image encoder named `TorchvisionResnetImageEncoder` in `mmf.modules.ImageEncoderFactory` — this encoder can instantiate any ResNet-like model from [`torchvision.models`](https://pytorch.org/docs/stable/torchvision/models.html) based on its name. The encoder returns spatial grid features same as torchvision. It can be instantiated using a minimal config as: ```yaml type: "torchvision_resnet" params: name: <name> pretrained: false ``` - Set `pretrained: true` for loading ImageNet-pretrained weights from torchvision. - Supported `<name>`s are: - `resnet18`, `resnet34`, `resnet50`, `resnet101`, `resnet152` - `resnext50_32x4d`, `resnext101_32x8d` - `wide_resnet50_2`, `wide_resnet101_2` ### Example ```python >>> import torch >>> from omegaconf import OmegaConf >>> from mmf.utils.build import build_encoder >>> >>> config = OmegaConf.load("encoder_config.yaml") >>> encoder = build_encoder(config) >>> images = torch.randn(32, 3, 224, 224) # shape: (b, c, h, w) >>> grid_feats = encoder(images) # shape: (b, 2048, 7, 7) ``` ### Backward Compatibility This PR maintains backward compatibility as it adds a new encoder without changing existing ones. However, it subsumes the functionality of [ResNet152ImageEncoder](https://github.com/facebookresearch/mmf/blob/d04914a7bbae28f33356e8b17113a81d6291a5dc/mmf/modules/encoders.py#L215), hence the latter could be later replaced and deprecated in favor of this addition. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/728 Reviewed By: ytsheng Differential Revision: D25991085 Pulled By: vedanuj fbshipit-source-id: 1c8f732ac43c0c81e6cf9cf41deca9dca3c39efe 26 January 2021, 00:43:15 UTC
cd77a4b [fix, test] Fix recall metric bug, add test (#746) Summary: - Fix infinite recursion error https://github.com/facebookresearch/mmf/issues/725 - Add back mistakenly removed code - Add test for recall metric at 1, 5, and 10 This is a response to bug https://github.com/facebookresearch/mmf/issues/725 I believe `process_ranks` may have been accidentally deleted in this commit so I added it back: https://github.com/facebookresearch/mmf/commit/6b6f4fc221c46f8c55d55a06e110f3d8f9ca2417 I also added a testing file, which basically ranks all of the expected values in increasing order (so the last candidate is always the chosen one). Both the expected values and predicted values are (10, 100) tensors. As the index of top level array increases, I alter the final value to be decreasing by 2, so the chosen candidates are 198 (maximum value 99*2), 191, 189, 187, ... I decrease it in this way so that each of the candidates become out of the bounds for the increasing Recall Metrics. The rankings are `tensor([ 1, 4, 5, 6, 7, 8, 9, 10, 11, 12])` This makes the results varying for each metric: `RecallAt1` --> 1/10 = .1 `RecallAt5` --> 3/10 = .3 `RecallAt10` --> 8/10 = .8 I would love for people to take a look at `metrics.py` line `462` (`process_ranks`) There are print statements in here from the previous commit, but I do not see print statements anywhere else in the modules, should I delete these, leave them, do we have a different logging style? Thanks! Pull Request resolved: https://github.com/facebookresearch/mmf/pull/746 Reviewed By: vedanuj Differential Revision: D26049706 Pulled By: brettallenyo fbshipit-source-id: 03546c76f9aed3a1c26b318eefb00fbb05d1297a 25 January 2021, 20:07:14 UTC
079f71d [fix] Allow loading checkpoint from a folder (#735) Summary: - Needed for e2e movie+mcan Pull Request resolved: https://github.com/facebookresearch/mmf/pull/735 Test Plan: - Tested locally with e2e movie+mcan handler - Adds tests for loading from a folder - Combines older file based test to main pretrained as they had sequential dep Reviewed By: ytsheng Differential Revision: D25936068 Pulled By: apsdehal fbshipit-source-id: 2c8989fcfaff2b1a2e56e4b97948809fc50bef49 21 January 2021, 01:58:09 UTC
0229af6 [enhancement] be more explicit in isort (#738) Summary: * print in ci the difference that isort would make * allow isort to be more explicit. * my pytorch lightning PR is experiencing some local/circleci inconsistencies for isort despite using the same version. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/738 Reviewed By: apsdehal Differential Revision: D25942131 Pulled By: ytsheng fbshipit-source-id: 67d33bbefca34229ee96cc815b52efdad913f68a 19 January 2021, 19:35:00 UTC
2848ba3 [feat] D2 backbone intergation, Movie MCAN e2e (#700) Summary: [WIP] E2E with grid feats D2 (https://github.com/facebookresearch/mmf/commit/563a62d7bbbd89c857f711e8ca2670d33c129279) models Pull Request resolved: https://github.com/facebookresearch/mmf/pull/700 Reviewed By: apsdehal Differential Revision: D25886006 Pulled By: vedanuj fbshipit-source-id: 1fe3633dc8101ffc6f28ce48c434533d7a300d98 12 January 2021, 19:16:32 UTC
d04914a [docs] update the terms and concepts doc (#724) Summary: * Updated the terms of concepts to include the latest models and datasets * Fixed the links in this page * Renamed pythia to mmf * Added links to those models/datasets Pull Request resolved: https://github.com/facebookresearch/mmf/pull/724 Reviewed By: apsdehal Differential Revision: D25727819 Pulled By: ytsheng fbshipit-source-id: 5e4fb0d3d98a6222ddea84f536e4b0ae19a67618 07 January 2021, 05:55:23 UTC
e00ef78 [docs] dataset split from train feature docs (#726) Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/726 Reviewed By: apsdehal Differential Revision: D25766616 Pulled By: ytsheng fbshipit-source-id: ae621b6a42b64d4387b4eb3ae5b9d2ad937cc8ec 05 January 2021, 01:23:27 UTC
51df5e5 [docs] Add LXMERT to model zoo doc (#719) Summary: Adding LXMERT to update model zoo documentation. Pull Request resolved: https://github.com/facebookresearch/mmf/pull/719 Reviewed By: ytsheng Differential Revision: D25618345 Pulled By: vedanuj fbshipit-source-id: f87913a9ca6f52d1ac590ef6af01a2438771314c 18 December 2020, 19:26:49 UTC
421b3f3 Bump ini from 1.3.5 to 1.3.8 in /website (#713) Summary: Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/npm/ini/commit/a2c5da86604bc2238fe393c5ff083bf23a9910eb"><code>a2c5da8</code></a> 1.3.8</li> <li><a href="https://github.com/npm/ini/commit/af5c6bb5dca6f0248c153aa87e25bddfc515ff6e"><code>af5c6bb</code></a> Do not use Object.create(null)</li> <li><a href="https://github.com/npm/ini/commit/8b648a1ac49e1b3b7686ea957e0b95e544bc6ec1"><code>8b648a1</code></a> don't test where our devdeps don't even work</li> <li><a href="https://github.com/npm/ini/commit/c74c8af35f32b801a7e82a8309eab792a95932f6"><code>c74c8af</code></a> 1.3.7</li> <li><a href="https://github.com/npm/ini/commit/024b8b55ac1c980c6225607b007714c54eb501ba"><code>024b8b5</code></a> update deps, add linting</li> <li><a href="https://github.com/npm/ini/commit/032fbaf5f0b98fce70c8cc380e0d05177a9c9073"><code>032fbaf</code></a> Use Object.create(null) to avoid default object property hazards</li> <li><a href="https://github.com/npm/ini/commit/2da90391ef70db41d10f013e3a87f9a8c5d01a72"><code>2da9039</code></a> 1.3.6</li> <li><a href="https://github.com/npm/ini/commit/cfea636f534b5ca7550d2c28b7d1a95d936d56c6"><code>cfea636</code></a> better git push script, before publish instead of after</li> <li><a href="https://github.com/npm/ini/commit/56d2805e07ccd94e2ba0984ac9240ff02d44b6f1"><code>56d2805</code></a> do not allow invalid hazardous string as section name</li> <li>See full diff in <a href="https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~isaacs">isaacs</a>, a new releaser for ini since your current version.</p> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ini&package-manager=npm_and_yarn&previous-version=1.3.5&new-version=1.3.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookresearch/mmf/network/alerts). </details> Pull Request resolved: https://github.com/facebookresearch/mmf/pull/713 Reviewed By: ytsheng Differential Revision: D25615831 Pulled By: vedanuj fbshipit-source-id: b7d5f6e3564cd40c883846698fd0831b081bf616 18 December 2020, 19:26:48 UTC
a2314dd [staticdocs][codemod] Enable code snippets in docusaurus sites Summary: Lets you embed code in markdown with the following syntax: ```` ```js file=../../some-file.js start=start_marker end=end_marker ``` ```` Reviewed By: nikoant Differential Revision: D25460060 fbshipit-source-id: 29e242d6d896e7c8256371483d72104889b9daa9 10 December 2020, 13:55:36 UTC
14ba005 [codemod][staticdocs] Enable fine-grained internal content Summary: This preset includes a remark plugin to allow you to import markdown files from `.../fb/...` directories. Previously such imports would cause the OSS site to fail to build, but with this it's safe. This means you can embed internal-only parts of pages, by transcluding other markdown files, e.g: ``` import InternalSection from './fb/internal-section.md'; # Public Section some public stuff <InternalSection /> # Another Public Section ... ``` When building the public site variant, files imported from `../fb/..` will be skipped. More instructions [here](https://www.internalfb.com/intern/wiki/Static_Docs/Internal-Only_Content/) The preset delegates to `preset-classic` for everything else. Reviewed By: snarkmaster Differential Revision: D25370009 fbshipit-source-id: 36ea3000f0342a82749316cc8df19ce30ccf4537 08 December 2020, 12:19:50 UTC
ec5c8b5 [feat] allow passing in model's file path for from_pretrained (#677) Summary: - from_pretrained to allow a filepath - add test Pull Request resolved: https://github.com/facebookresearch/mmf/pull/677 Reviewed By: apsdehal Differential Revision: D25167229 Pulled By: ytsheng fbshipit-source-id: 2bc976e6239b4d6bd23b7e0b9f3d8495e9381d2d 08 December 2020, 02:21:10 UTC
f3d3da4 [fix, doc] add image feature extraction tutorial + small fixes (#673) Summary: - fix link errors in the documentation - add image feature extraction tutorials Pull Request resolved: https://github.com/facebookresearch/mmf/pull/673 Reviewed By: apsdehal Differential Revision: D24967971 Pulled By: ytsheng fbshipit-source-id: d7302fded6a3ed1dc2b8dd2fe65efea43c7bc11d 08 December 2020, 00:41:05 UTC
40b63e7 [fix] Typo in LMDBConversion (#699) Summary: Fix typo when extracting image features from .mdb file to .npy files. **Fix:** In **Line#95** image height is set to be the image width, which is wrong: https://github.com/facebookresearch/mmf/blob/518a5a675586e4dc1b415a52a8a80c75edfc2960/tools/scripts/features/lmdb_conversion.py#L95-L96 Pull Request resolved: https://github.com/facebookresearch/mmf/pull/699 Reviewed By: apsdehal Differential Revision: D25219613 Pulled By: vedanuj fbshipit-source-id: 3735ae890fcbba27cbd206086d582224866b051e 04 December 2020, 19:06:37 UTC
a221f06 [fix,feat] update the state_key based on module (#675) Summary: - Allow for module-wise state dict key update - Make use of the `_register_load_state_dict_pre_hook` to update the key of the state dict - opted for this approach because recursion is already being implemented in the load_state_dict function and therefore I think there is no need to re-implement recursion. Better to make use of the pytorch implementation. - Slightly cleaner fix compared to this fix: [664](https://github.com/facebookresearch/mmf/pull/664) - Some documentation clean up Pull Request resolved: https://github.com/facebookresearch/mmf/pull/675 Reviewed By: vedanuj Differential Revision: D24714619 Pulled By: ytsheng fbshipit-source-id: ccbf85c9aedae4bded3234d9b178e6b34241bbc3 03 December 2020, 00:01:06 UTC
6aec3eb [fix] Update README.md to fix typo (#698) Summary: * fix typo Pull Request resolved: https://github.com/facebookresearch/mmf/pull/698 Reviewed By: vedanuj Differential Revision: D25180465 Pulled By: ytsheng fbshipit-source-id: d53009df5118841f098316e9af6f4b4ab72ee500 30 November 2020, 19:26:40 UTC
back to top