1. 25 Jun, 2021 3 commits
    • Haricharan Lakshman's avatar
      Freeze matched bn layers · 4169abc1
      Haricharan Lakshman authored
      Summary:
      Convert the batchnorm layers that match the specified regular expressions to FrozenBatchNorm2d.
      
      If module is an instance of batchnorm and it matches the reg exps, returns a new FrozenBatchNorm2d module.
      
      Otherwise, in-place converts the matching batchnorm child modules to FrozenBatchNorm2d
      and returns the main module.
      
      Reviewed By: ppwwyyxx
      
      Differential Revision: D29286500
      
      fbshipit-source-id: 3a20f5eeff59ddff50c42fe297eedf0ce2b909bc
      4169abc1
    • Luming Ma's avatar
      read "bbox_mode" from annotation when filtering out images with invalid bbox · 77ef0db7
      Luming Ma authored
      Summary: Some annotations are using XYXY_ABS for bbox mode so that many images were incorrectly filtered out by assuming XYWH_ABS mode. This diff read bbox_mode from annotation and convert bbox to XYWH_ABS before checking invalid bbox.
      
      Differential Revision: D29365700
      
      fbshipit-source-id: 355346b6826f401f504691090631997e169ead4a
      77ef0db7
    • Sam Tsai's avatar
      use src dataset name instead of the derived class name · d4aedb83
      Sam Tsai authored
      Summary: "@ [0-9]classes" is appended to datasets to mark whether it is a derived class of the original one and saved as a config. When reloading the config, the derived class name will be used as the source instead of the original source. Adding a check to remove the derived suffix.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D29315132
      
      fbshipit-source-id: 0cc204d305d2da6c9f1817aaf631270bd874f90d
      d4aedb83
  2. 24 Jun, 2021 1 commit
    • Zhicheng Yan's avatar
      stabilize the training of deformable DETR with box refinement · c480d4e4
      Zhicheng Yan authored
      Summary:
      Major changes
      - As described in details in appendix A.4 in deformable DETR paper (https://arxiv.org/abs/2010.04159), the gradient back-propagation is blocked at inverse_sigmoid(bounding box x/y/w/h from last decoder layer). This can be implemented by detaching tensor from compute graph in pytorch. However, currently we detach at an incorrect tensor, preventing update the layers which predicts delta x/y/w/h. Fix this bug.
      - Add more comments to annotate data types and tensor shape in the code. This should NOT affect the actual implementation.
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D29048363
      
      fbshipit-source-id: c5b5e89793c86d530b077a7b999769881f441b69
      c480d4e4
  3. 23 Jun, 2021 1 commit
  4. 21 Jun, 2021 1 commit
    • Yuxin Wu's avatar
      additional flop counting using fvcore's flop counter · bc9d5070
      Yuxin Wu authored
      Summary:
      1. save 3 versions of flop count, using both mobile_cv's flop counter and fvcore's flop counter
      2. print only a simple short table in terminal, but save others to files
      
      The `print_flops` function seems not used anywhere so this diff just replaced it.
      
      TODO: enable this feature automatically for train/eval workflows in the next diff
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D29182412
      
      fbshipit-source-id: bfa1dfad41b99fcda06b96c4732237b5e753f1bb
      bc9d5070
  5. 20 Jun, 2021 1 commit
    • Albert Pumarola's avatar
      Add unittest for DETR runner · 54b352d9
      Albert Pumarola authored
      Summary: Add create and train unit tests to OSS runner
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D29254417
      
      fbshipit-source-id: f7c52b90b2bc7afa83a204895be149664c675e52
      54b352d9
  6. 19 Jun, 2021 2 commits
    • Yanghan Wang's avatar
      enable hive loader for person segmentation · 58f0ae3d
      Yanghan Wang authored
      Reviewed By: leitian
      
      Differential Revision: D28363172
      
      fbshipit-source-id: e69a71e6525dc9b76171b0cdc5f55ee8d188d6cc
      58f0ae3d
    • Fu-Chen Chen's avatar
      fix bug when checking for invalid bounding boxes · de0829f1
      Fu-Chen Chen authored
      Summary:
      The dict `record` might not have keys `"width"` or `"height"`.
      This diff check if `"width"` and `"height"` are in the dict `record` before getting the values.
      
      Reviewed By: sstsai-adl
      
      Differential Revision: D29243341
      
      fbshipit-source-id: a1e0e343dd1afcced834c3732e64bb6f372fbd1a
      de0829f1
  7. 16 Jun, 2021 4 commits
    • Luis Perez's avatar
      Synchronize PyTorchLightning/pytorch-lightning (revision f7459f53@master) to... · 670b4c4a
      Luis Perez authored
      Synchronize PyTorchLightning/pytorch-lightning (revision f7459f53@master) to github/third-party/PyTorchLightning/pytorch-lightning
      
      Summary:
      ## OSS
      Note these issues are being solved in OSS here: https://github.com/PyTorchLightning/pytorch-lightning/pull/7994/files#
      
      ## Manual
      - `speed_monitor.py` - `Result.unpack_batch_size` has been removed, moved to new implementation.
      - `fully_sharded.py` - There was a refactor for plugins, so updated corresponding function to keep reduced memory usage.
      - `hive_writing_classy.py`, `hive_writing_faim.py`, `hive_writing_xrayvideo.py` - Same as `speed_monitor.py`.
      - [Temporary] Uncommented misconfiguration exception. See https://github.com/PyTorchLightning/pytorch-lightning/pull/7882#pullrequestreview-683282719.
      - Update `TestModel` to detach appropriately.
      - Manually `detach` metrics stored in ResultStore.
      
      ## Automatic
      ### New commit log messages
        f7459f53 DeepSpeed Infinity Update (#7234)
        03e7bdf8 Improve `LightningModule` hook tests (#7944)
        3a0ed02b Properly handle parent modules w/ parameters in `BaseFinetuning` callback (#7931)
        ce93d8bc Handle errors due to uninitailized parameters (#7642)
        cca0e753 remove parsing comments (#7958)
        898fb56b added on_test_start() documentation (#7962)
        22d82661 Seed all workers when using DDP (#7942)
        436fc53c Improve `LightningDataModule` hook test and fix `dataloader_idx` argument (#7941)
        6b7b4047 deprecate hpc_load() and integrate it with restore() (#7955)
        20a5e09e fix myst-parser warning blocking docs ci (#7967)
        f15ea601 update chlog + legacy chpt (#7954)
        59d0c656 Add dataclass support to `apply_to_collection` (#7935)
        cdd01f32 LightningCLI support for argument links applied on instantiation (#7895)
        6856cced Remove rank_zero_only on DataModule prepare_data (#7945)
        96433d03 IPU Integration 5/5 (#7867)
        42c7f272 refactor checkpoint loading for training type plugins (#7928)
        ac4eb0a0 `is_overridden` improvements (#7918)
        9e932f4d Delete `on_after_backward` unused argument (#7925)
        8b738693 Deprecate the default `EarlyStopping` callback monitor value (#7907)
        c1eac483 split `restore_training_state` into logical parts [2 / 2] (#7900)
        d209b689 split `restore_training_state` into logical parts [1 / 2] (#7901)
        111287b4 add pre-commit hooks (#7906)
        839019a3 Remove legacy teardown check in train loop (#7917)
        b45a89a2 Clean-up after logger connector redesign 2/2 (#7631)
        07b69231 Remove fn check for ipu output (#7915)
        580a3b5e Remove dead code (#7910)
        df812398 Clean-up after logger connector redesign 1/2 (#7909)
        ec4f8856 Enable logger connector re-design (#7891)
        15be9865 add logger to __all__ (#6854)
        6fee9262 Deprecate `LightningDataModule` lifecycle properties (#7657)
        764d2c77 refactor CheckpointConnector.restore_weights  (#7862)
        7f4ef6d1 Fix logs overwriting issue for remote fs (#7889)
        c310ce66 Logger connector re-design `_Metadata.reduce_fx` fixes. (#7890)
        b214442e New logger connector code (#7882)
      
      Reviewed By: yifuwang
      
      Differential Revision: D29105294
      
      fbshipit-source-id: 990b2a4a7333908d676de193f5ec930cb50b8a19
      670b4c4a
    • Kai Zhang's avatar
      Log D2Go model instantiation events · 14b25e8d
      Kai Zhang authored
      Summary: This diff logs D2 (https://github.com/facebookresearch/d2go/commit/692a4fb3c506aeebbb49070a20d139d617381b19)Go model instantiation events to table scuba_caffe2_pytorch_usage_stats, so that we could track model usage in fblearner, bento, local scripts, etc.
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D28986723
      
      fbshipit-source-id: 3e865354e5884c9e82bd1b08819cc10d349f93bd
      14b25e8d
    • Sam Tsai's avatar
      add segmentation points and use circular kp pattern · dcdf3dcf
      Sam Tsai authored
      Summary:
      1. Circular pattern segmentation points
      2. Use circular pattern for kp patterns
      
      Reviewed By: wat3rBro
      
      Differential Revision: D29069224
      
      fbshipit-source-id: c4c01d6d93de5abbdfceae07f1cd48fb56e05f57
      dcdf3dcf
    • Sam Tsai's avatar
      add check/filter for invalid bounding boxes · 692a4fb3
      Sam Tsai authored
      Summary: Checks for invalid bounding boxes and removes from the being included.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D28902711
      
      fbshipit-source-id: 1f017d6ccf5c959059bcb94a09ddd81de868feed
      692a4fb3
  8. 15 Jun, 2021 1 commit
  9. 14 Jun, 2021 1 commit
  10. 12 Jun, 2021 1 commit
  11. 09 Jun, 2021 2 commits
    • Yanghan Wang's avatar
      remove deprecated silicon quantization · 62c21f25
      Yanghan Wang authored
      Summary: EZ
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D29000628
      
      fbshipit-source-id: f954214dfe3a989fc145663f8bb1870812e78ce7
      62c21f25
    • Sam Tsai's avatar
      allow for multiple datasets for test data loader creation · fc690b45
      Sam Tsai authored
      Summary: Use all training dataset for export instead of just first. This is to support use cases where there is only a small amount of images per jsons but a number of jsons. Since calibration uses the first dataset, it is limited by the number of images in a single dataset.
      
      Reviewed By: ppwwyyxx
      
      Differential Revision: D28902673
      
      fbshipit-source-id: f80146b02d2d1bc04703fbb21ef410f5e26ba64c
      fc690b45
  12. 07 Jun, 2021 1 commit
  13. 01 Jun, 2021 2 commits
    • Yanghan Wang's avatar
      misc update to config utils · 81ab967f
      Yanghan Wang authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/77
      
      - Reimplement `get_cfg_diff_table` by reusing other utils
      - Adding `reorder` option for `flatten_config_dict`
      - Remove the legacy BC support for `ARCH_DEF`, including `str_wrap_fbnet_arch_def` and customized `merge_from_other_cfg`.
      - Move `temp_defrost` from `utils.py` to `config.py`, this way there's no more namespace forwarding for `utils.py`
      - Merge `test_config_utils.py` and `test_configs.py`
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D28734493
      
      fbshipit-source-id: 925f5944cf0e9019e4c54462e851ea16a5c94b8c
      81ab967f
    • Yanghan Wang's avatar
      supporting embed config in extra_files · ad9f35c7
      Yanghan Wang authored
      Reviewed By: sanjeevk42
      
      Differential Revision: D28346869
      
      fbshipit-source-id: b226acf5ee5d90be4ea183dc7de92133db4d5717
      ad9f35c7
  14. 27 May, 2021 1 commit
    • Tao Xu's avatar
      add an option to set the number of test images · 73f0f05f
      Tao Xu authored
      Summary: Add an option to set the number of test images. Thus, during finetune, we can set a small number of test images (for only visualization purpose) to save the time for evaluation.
      
      Reviewed By: leehomyc
      
      Differential Revision: D28720086
      
      fbshipit-source-id: 8085be6a0f4f8742784e3dafe255716f3ae02acb
      73f0f05f
  15. 25 May, 2021 3 commits
    • Kai Zhang's avatar
      fix for checking device type · bf395ce5
      Kai Zhang authored
      Summary: Currently we are checking if MODEL.DEVICE is "gpu", but actually we DEVICE could also be "cuda". This diff checks if device is "cpu" instead.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D28689547
      
      fbshipit-source-id: 7512d32b7c08b0dcdc6487c6c2f1703655e64b19
      bf395ce5
    • Yanghan Wang's avatar
      update RCNN model test base · 0ab6d3f1
      Yanghan Wang authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/75
      
      Refactor the base test case
      - make test_dir valid throughout the test (rather than under local context), so individual test can load back the export model
      - refactor the `custom_setup_test` for easier override.
      - move parameterized into base class to avoid copying naming function
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D28651067
      
      fbshipit-source-id: c59a311564f6114039e20ed3a23e5dd9c84f4ae4
      0ab6d3f1
    • Kai Zhang's avatar
      Read number of processes from dist_config · 29b57165
      Kai Zhang authored
      Summary: Currently when launching a training flow, we read number of processes from resources.num_gpus. To be backward compatible with existing D2 (https://github.com/facebookresearch/d2go/commit/f82d44d3c33e6c781a3c6f2b27b376fdfbaeda53)Go training config, this diff changes to dist_config.num_processes_per_machine instead.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D28630334
      
      fbshipit-source-id: 3c684cd56e5d2e247c7b82e1d1eeff0f39e59ee4
      29b57165
  16. 24 May, 2021 1 commit
  17. 22 May, 2021 2 commits
  18. 21 May, 2021 3 commits
  19. 17 May, 2021 2 commits
    • Kai Zhang's avatar
      add dataset visualization · 536e9d25
      Kai Zhang authored
      Summary: Add dataset visualization so that we could visualize test results in Tensorboard.
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D28457363
      
      fbshipit-source-id: 4c2fd9dce349c6fb9e1cec51c9138cf0abb45d7b
      536e9d25
    • Jacob Szwejbka's avatar
      Remove run_on_bundled_input · fdd64119
      Jacob Szwejbka authored
      Summary:
      Pull Request resolved: https://github.com/pytorch/pytorch/pull/58344
      
      remove a helper function thats more trouble then its worth.
      
      ghstack-source-id: 129131889
      
      Reviewed By: dhruvbird
      
      Differential Revision: D28460607
      
      fbshipit-source-id: 31bd6c1cc169785bb360e3113d258b612cad47fc
      fdd64119
  20. 16 May, 2021 1 commit
    • Zhicheng Yan's avatar
      create CfgNode with consistent type · cbd695ac
      Zhicheng Yan authored
      Summary: Create new CfgNode that is consistent with the parent node.
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D28318466
      
      fbshipit-source-id: 38cb84de6bdfec2b283c4d9a1090cad47c118c9c
      cbd695ac
  21. 14 May, 2021 1 commit
  22. 13 May, 2021 2 commits
    • Kai Zhang's avatar
      Auto scale config for multi-node training · e87ed5f0
      Kai Zhang authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/62
      
      Lightning trainer set max step to cfg.SOLVER.MAX_ITER. However, this is the max iteration for all nodes, in multi-node training, we need to scale it down, as well as eval period and other configs.
      This diff calls `auto_scale_world_size` before passing the config to trainer.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D28140877
      
      fbshipit-source-id: 2639ae58773a4ec2a0cc59dfefb2f5d9b1afe1a8
      e87ed5f0
    • Yanghan Wang's avatar
      remove adet's default config from base runner · f3d05021
      Yanghan Wang authored
      Reviewed By: zhanghang1989
      
      Differential Revision: D28346653
      
      fbshipit-source-id: d80a1f824b097c05029edb171739a4928e47e4d8
      f3d05021
  23. 12 May, 2021 1 commit
    • Luis Perez's avatar
      Synchronize PyTorchLightning/pytorch-lightning (revision 7b283e3c@master) to... · 0848c589
      Luis Perez authored
      Synchronize PyTorchLightning/pytorch-lightning (revision 7b283e3c@master) to github/third-party/PyTorchLightning/pytorch-lightning
      
      Summary:
      # Manual
       - remove fixme's in `model_checkpoint.py`, `parameter_monitor.py`, `test_quantization.py`, and `speed_monitor.py` now that `Trainer` is properly annotated.
      - update `test_quantization.py` to `trainer.train_loop.global_step` instead of `trainer.global_step` which is a read-only.
      - update `loop_callback.py` to read from `train_loop` for `batch_idx` (which is no longer available).
      
      # Automatic
      ### New commit log messages
        7b283e3c Bugfix/Multiple dataloaders (#7433)
        d7c44cc6 Docs: sync chlog 1.3.1 (#7478)
        fdf50a5e Mark certain Trainer APIs as protected (#7420)
        ad9118f0 remove trainer hidden state | sanity refactor [1 / n] (#7437)
        4a1134db Log epoch metrics before firing the `on_evaluation_end` hook (#7272)
        b65ae794 Automatically check `DataModule.has_{setup,teardown,prepare_data}` [2/2] (#7238)
        8660d8cf [pre-commit.ci] pre-commit autoupdate (#7475)
        f6fe715e Fix Sphinx argument deprecation (#7464)
      
      Reviewed By: shuyingsunshine21
      
      Differential Revision: D28353491
      
      fbshipit-source-id: 98b87d99e2f09b47b07270858fcbdb5d5299730b
      0848c589
  24. 10 May, 2021 2 commits