1. 17 Mar, 2022 1 commit
    • Yanghan Wang's avatar
      misc updates · 4f651f97
      Yanghan Wang authored
      Summary:
      - remove the `None` support for `merge_from_list`
      - fix logging when initializing diskcacje
      - Don't inherit `_FakeListObj` fron `list`, so looping over it can raise error.
      
      Reviewed By: sstsai-adl
      
      Differential Revision: D34952714
      
      fbshipit-source-id: f636e408b79ed77904f257f189fcef216cb2efbc
      4f651f97
  2. 16 Mar, 2022 4 commits
    • Tsahi Glik's avatar
      Cleanup QAT api · 5074692f
      Tsahi Glik authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/190
      
      Currently there is some fragmentation in export for how to apply convert logic in various mode. `prepare_for_quant_convert` is only called in non eager modes and the logic in eager mode is not customizable.
      This diff unify the `prepare_for_quant_convert` code path for all quantization modes.
      Also in this diff we rename `_non_qat_to_qat_state_dict_map`, that is use in qat checkpointer to be publish var `non_qat_to_qat_state_dict_map` and allow models to populate it with custom mapping. This is useful in cases where the param mapping between the non qat model and the qat model cannot be inferred definitely (see note in https://fburl.com/code/9rx172ht) and have some ambiguity that can only be resolved by the model logic.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D34741217
      
      fbshipit-source-id: 38edfec64200ec986ffe4f3d47f527cb6a3fb5e9
      5074692f
    • Yanghan Wang's avatar
      fix the overwrite_opts and handle the new_allowed properly · 2b618211
      Yanghan Wang authored
      Summary:
      D33301363 changes the signature of `update_cfg` from `update_cfg(cfg, *updaters)` to `update_cfg(cfg, updaters, new_allowed)`, while the call sites are not updated. Eg. https://www.internalfb.com/code/fbsource/[9e071979a62ba7fd3d7a71dee1f0809815cbaa43]/fbcode/fblearner/flow/projects/mobile_vision/detectron2go/core/workflow.py?lines=221-225, the `merge_from_list_updater(e2e_train.overwrite_opts),` is then not used.
      
      For the fix:
      - Since there're a lot of call sites for `update_cfg` it's better to keep the original signature.
      - ~~~The `new_allowed` can actually be passed to each individual updater instead of the `update_cfg`, this also gives finer control.~~~
      - Make override the `merge_from_list` to make it respect `new_allowed`.
      - Preserve the `new_allowed` for all nodes (not only the root) in the FLOW Future calls.
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D34840001
      
      fbshipit-source-id: 14aff6bec75a8b53d4109e6cd73d2494f68863b4
      2b618211
    • Chengjiang Long's avatar
      Implement the user calibration model option 3 under D2GO · b30cf9d2
      Chengjiang Long authored
      Summary:
      Dataloader:
      Rewrote the data loader via build_stream_dataset_reader with the DATASET_DEFINITION of "peopleai_face_eng_inference_results".
      
      User Calibration Model (initial version):
      
      nn.Sequential(
          nn.Conv1d(72, 128, 1),
          nn.BatchNorm1d(128),
          nn.ReLU(),
          nn.Flatten(),
          nn.Linear(128, 72),
      )
      
      Differential Revision: D34202009
      
      fbshipit-source-id: 55a2c579e463ed19eac38b5dd12e11c09cbccc11
      b30cf9d2
    • Ananth Subramaniam's avatar
      Trainer(checkpoint_callback) -> Trainer(enable_checkpointing) · f781223c
      Ananth Subramaniam authored
      Reviewed By: kazhang
      
      Differential Revision: D34669519
      
      fbshipit-source-id: 8cfee968104c823a55960f2730d8e888ac1f298e
      f781223c
  3. 10 Mar, 2022 1 commit
  4. 09 Mar, 2022 1 commit
  5. 08 Mar, 2022 2 commits
  6. 07 Mar, 2022 1 commit
  7. 05 Mar, 2022 2 commits
  8. 04 Mar, 2022 4 commits
  9. 03 Mar, 2022 1 commit
  10. 01 Mar, 2022 1 commit
    • Tong Xiao's avatar
      Allow Users to Disable the Evaluation after the Last Training Iteration · f16cc060
      Tong Xiao authored
      Summary:
      `Detectron2GoRunner` defaults to trigger an evaluation right after the last iteration in the `runner.do_train` method. This sometimes might be unnecessary, because there is a `runner.do_test` at the end of training anyways.
      
      It could also lead to some side effects. For example, it would cause the training and test data loader present at the same time, which led to an OOM issue in our use case.
      
      In this diff, we add an option `eval_after_train` in the `EvalHook` to allow users to disable the evaluation after the last training iteration.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D34295685
      
      fbshipit-source-id: 3612eb649bb50145346c56c072ae9ca91cb199f5
      f16cc060
  11. 28 Feb, 2022 2 commits
  12. 25 Feb, 2022 1 commit
  13. 24 Feb, 2022 1 commit
    • Yanghan Wang's avatar
      exclude d2go&project lib from .gitignore · fb0164c3
      Yanghan Wang authored
      Summary: It's possible to have `lib` under core `mobile-vision/d2go/{d2go,projects}`, exclude them from `.gitignore`.
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D34288538
      
      fbshipit-source-id: 7094cdf4f52263fbf6ff6707d487bc3328fbbd8b
      fb0164c3
  14. 23 Feb, 2022 3 commits
  15. 14 Feb, 2022 1 commit
    • Tugrul Savran's avatar
      D2Go Fail Fast: Move exception coming from not implemented "compare accuracy" feature to the top. · eee4dfc1
      Tugrul Savran authored
      Summary:
      Currently, the exporter method takes in a compare_accuracy parameter, which after all the compute (exporting etc.) raises an exception if it is set to True.
      
      This looks like an antipattern, and causes a waste of compute.
      
      Therefore, I am proposing to raise the exception at the very beginning of method call to let the client know in advance that this argument's functionality isn't implemented yet.
      
      NOTE: We might also choose to get rid of the entire parameter. I am open for suggestions.
      
      Differential Revision: D34186578
      
      fbshipit-source-id: d7fbe7589dfe2d2f688b870885ca61e6829c9329
      eee4dfc1
  16. 11 Feb, 2022 1 commit
    • Yanghan Wang's avatar
      add inference path · 614336e4
      Yanghan Wang authored
      Reviewed By: Maninae
      
      Differential Revision: D34097529
      
      fbshipit-source-id: e3c860bb2374e694fd6ae54651a479c2398b2462
      614336e4
  17. 10 Feb, 2022 1 commit
  18. 07 Feb, 2022 1 commit
  19. 03 Feb, 2022 1 commit
  20. 02 Feb, 2022 1 commit
  21. 29 Jan, 2022 1 commit
  22. 27 Jan, 2022 3 commits
    • Hang Zhang's avatar
      Remove Pre-norm option, since it is not used · 6994f168
      Hang Zhang authored
      Summary: As in the tittle
      
      Reviewed By: XiaoliangDai
      
      Differential Revision: D33413849
      
      fbshipit-source-id: b891849c175edc7b8916bff2fcc40c76c4658f14
      6994f168
    • Hang Zhang's avatar
      Enable Learnable Query TGT · 9200cbe8
      Hang Zhang authored
      Summary: Learnable query doesn't improve the results, but it helps DETR with reference points in D33420993
      
      Reviewed By: XiaoliangDai
      
      Differential Revision: D33401417
      
      fbshipit-source-id: 5296f2f969c04df18df292d61a7cf57107bc9b74
      9200cbe8
    • Hang Zhang's avatar
      Refactor Code Base · 4985ef73
      Hang Zhang authored
      Summary: Add DETR_MODEL_REGISTRY registry to better support different variant of DETR (in later diff).
      
      Reviewed By: newstzpz
      
      Differential Revision: D32874194
      
      fbshipit-source-id: f8e9a61417ec66bec9f2d98631260a2f4e2af4cf
      4985ef73
  23. 20 Jan, 2022 1 commit
    • Sam Tsai's avatar
      fix pickling issue in EnlargeBoundingBox · 189d83d7
      Sam Tsai authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/166
      
      Pickling of transform functions seems to have changed (did not dig into it) in December, breaking the support for this augmentation. This error happens when training with multiple dataloaders. Using partial functions instead.
      
      Differential Revision: D33665177
      
      fbshipit-source-id: 4dfd41b92f3a6fea549b6e7a79bf0bf14a3cceaa
      189d83d7
  24. 18 Jan, 2022 1 commit
    • Miquel Jubert Hermoso's avatar
      Fix type signature of create_runner · c74e23b0
      Miquel Jubert Hermoso authored
      Summary: The type signature of create_runner is not accurate. We expect lightning runners to follow DefaultTask. Also change setup.py to not import directly, which was causing circular dependencies together with the change.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D32792069
      
      fbshipit-source-id: 0fbb55eb269dd681dbc8df49d71c9635f56293b8
      c74e23b0
  25. 14 Jan, 2022 1 commit
  26. 13 Jan, 2022 2 commits
    • Tsahi Glik's avatar
      Add support for custom training step via meta_arch · b6e244d2
      Tsahi Glik authored
      Summary:
      Add support in the default lightning task to run a custom training step from Meta Arch if exists.
      The goal is to allow custom training step without the need to inherit from the default lightning task class and override it. This will allow us to use a signle lightning task and still allow users to customize the training step. In the long run this will be further encapsulated in modeling hook, making it more modular and compositable with other custom code.
      
      This change is a follow up from discussion in  https://fburl.com/diff/yqlsypys
      
      Reviewed By: wat3rBro
      
      Differential Revision: D33534624
      
      fbshipit-source-id: 560f06da03f218e77ad46832be9d741417882c56
      b6e244d2
    • Tsahi Glik's avatar
      Person segmentation using torch lightning · c687fb83
      Tsahi Glik authored
      Summary:
      Add option to train Person Instance Segmentation using lightning instead of D2 (https://github.com/facebookresearch/d2go/commit/7992f91324aee6ae59795063a007c6837e60cdb8).
      This is needed because we want to try PIS with SuperNet and our SuperNet based training is implemented in d2go lightning task
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D33281437
      
      fbshipit-source-id: e1b6567f3c77ce51240fb50d81350bc97735713a
      c687fb83