1. 09 Nov, 2022 1 commit
  2. 08 Nov, 2022 1 commit
  3. 03 Nov, 2022 1 commit
    • Yanghan Wang's avatar
      use SharedList as offload backend of DatasetFromList by default · 01c351bc
      Yanghan Wang authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/405
      
      - Use the non-hacky way (added in D40818736, https://github.com/facebookresearch/detectron2/pull/4626) to customize offloaded backend for DatasetFromList.
      - In `D2 (https://github.com/facebookresearch/d2go/commit/87374efb134e539090e0b5c476809dc35bf6aedb)Go`, switch to use `SharedList` (added in D40789062, https://github.com/facebookresearch/mobile-vision/pull/120) by default to save RAM and optionally use `DiskCachedList` to further save RAM.
      
      Local benchmarking results (using a ~2.4 GiB dataset) using dev mode:
      | RAM usage (RES, SHR) | No-dataset | Naive | NumpySerializedList | SharedList | DiskCachedList |
      | -- | -- | -- | -- | -- | -- |
      | Master GPU worker.         | 8.0g, 2.8g | 21.4g, 2.8g | 11.6g, 2.8g | 11.5g, 5.2g | -- |
      | Non-master GPU worker  | 7.5g, 2.8g | 21.0g, 2.8g | 11.5g, 2.8g | 8.0g, 2.8g | -- |
      | Per data loader worker     | 2.0g, 1.0g | 14.0g, 1.0g | 4.4g, 1.0g | 2.1g, 1.0g | -- |
      
      - The memory usage (RES, SHR) is found from `top` command. `RES` is total memory used per process; `SHR` shows how much RAM can be shared inside `RES`.
      - experiments are done using 2 GPU and 2 data loader workers per GPU, so there're 6 processes in total, the **numbers are per-process**.
      - `No-dataset`: running the same job with tiny dataset (only 4.47 MiB after serialization), since RAM usage should be negligible, it shows the floor RAM usage.
      - other experiments are running using a dataset of the size of **2413.57 MiB** after serialization.
        - `Naive`: vanilla version if we don't offload the dataset to other storage.
        - `NumpySerializedList`: this optimization was added a long time ago in D19896490. I recalled that the RAM was indeed shared for data loader worker, but seems that there was a regression. Now basically all the processes have a copy of data.
        - `SharedList`: is enabled in this diff. It shows that only the master GPU needs extra RAM. It's interesting that it uses 3.5GB RAM more than other rank, while the data itself is 2.4GB. I'm not so sure if it's overhead of the storage itself or the overhead caused by sharing it with other processes, since non-master GPU using `NumpySerializedList` also uses 11.5g of RAM, we probably don't need to worry too much about it.
        - `DiskCachedList`: didn't benchmark, should have no extra RAM usage.
      
      Using the above number for a typical 8GPU, 4worker training, assuming the OS and other programs take 20-30GB RAM, the current training will use `11.6g * 8 + 4.4g * 8*4 = 233.6g` RAM, on the edge of causing OOM for a 256gb machine. This aligns with our experience that it supports ~2GB dataset. After the change, the training will use only `(11.5g * 7 + 8.0g) + 2.1g * 8*4 = 155.7g` RAM, which gives a much larger head room, we can thus train with much larger dataset (eg. 20GB) or use more DL workers (eg. 8 workers).
      
      Reviewed By: sstsai-adl
      
      Differential Revision: D40819959
      
      fbshipit-source-id: fbdc9d2d1d440e14ae8496be65979a09f3ed3638
      01c351bc
  4. 28 Oct, 2022 2 commits
  5. 26 Oct, 2022 2 commits
  6. 26 Jul, 2022 1 commit
  7. 05 Jun, 2022 1 commit
  8. 02 Jun, 2022 1 commit
  9. 29 Apr, 2022 1 commit
  10. 19 Apr, 2022 1 commit
    • Lisa Roach's avatar
      apply import merging for fbcode/mobile-vision/d2go (3 of 4) · ae2f2f64
      Lisa Roach authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/212
      
      Applies new import merging and sorting from µsort v1.0.
      
      When merging imports, µsort will make a best-effort to move associated
      comments to match merged elements, but there are known limitations due to
      the diynamic nature of Python and developer tooling. These changes should
      not produce any dangerous runtime changes, but may require touch-ups to
      satisfy linters and other tooling.
      
      Note that µsort uses case-insensitive, lexicographical sorting, which
      results in a different ordering compared to isort. This provides a more
      consistent sorting order, matching the case-insensitive order used when
      sorting import statements by module name, and ensures that "frog", "FROG",
      and "Frog" always sort next to each other.
      
      For details on µsort's sorting and merging semantics, see the user guide:
      https://usort.readthedocs.io/en/stable/guide.html#sorting
      
      Reviewed By: jreese, wat3rBro
      
      Differential Revision: D35559673
      
      fbshipit-source-id: feeae2465ac2b62c44a0e92dc566e9a386567c9d
      ae2f2f64
  11. 05 Apr, 2022 1 commit
    • Yanghan Wang's avatar
      refactor create_fake_detection_data_loader · 312c6b62
      Yanghan Wang authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/199
      
      - `create_fake_detection_data_loader` currently doesn't take `cfg` as input, sometimes we need to test the augmentation that needs more complicated different cfg.
      - name is a bit bad, rename it to `create_detection_data_loader_on_toy_dataset`.
      - width/height were the resized size previously, we want to change it to the size of data source (image files) and use `cfg` to control resized size.
      
      Update V3:
      In V2 there're some test failures, the reason is that V2 is building data loader (via GeneralizedRCNN runner) using actual test config instead of default config before this diff + dataset name change. In V3 we uses the test's runner instead of default runner for the consistency. This reveals some real bugs that we didn't test before.
      
      Reviewed By: omkar-fb
      
      Differential Revision: D35238890
      
      fbshipit-source-id: 28a6037374e74f452f91b494bd455b38d3a48433
      312c6b62
  12. 04 Mar, 2022 3 commits
  13. 25 Feb, 2022 1 commit
  14. 23 Feb, 2022 1 commit
  15. 22 Dec, 2021 1 commit
    • Sam Tsai's avatar
      registry and copy keys for extended coco load · bfd78461
      Sam Tsai authored
      Summary:
      1. Add registry for coco injection to allow for easier overriding of cococ injections
      2. Coco loading currently is limited to certain keys. Adding option to allow for copying certain keys from the outputs.
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D33132517
      
      fbshipit-source-id: 57ac4994a66f9c75457cada7e85fb15da4818f3e
      bfd78461
  16. 09 Sep, 2021 1 commit
  17. 25 Jun, 2021 1 commit
    • 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
  18. 16 Jun, 2021 1 commit
    • 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
  19. 21 May, 2021 1 commit
    • Sam Tsai's avatar
      adding bounding box only options · 27bef8e3
      Sam Tsai authored
      Summary: Option to change only bounding boxes, others remain the same.
      
      Differential Revision: D28339388
      
      fbshipit-source-id: 7a6d4c5153cf10c473992119f4c684e0b9159b44
      27bef8e3
  20. 07 May, 2021 1 commit
  21. 05 May, 2021 1 commit
    • Sam Tsai's avatar
      add enlarge bounging box manipulation · e1961ad4
      Sam Tsai authored
      Summary: Add a bounding manipulation tool to padding bounding box data.
      
      Reviewed By: newstzpz
      
      Differential Revision: D28082071
      
      fbshipit-source-id: f168cae48672c4fa5c4ec98697c57ed7833787ab
      e1961ad4
  22. 30 Apr, 2021 1 commit
    • Sam Tsai's avatar
      add keypoints metadata registry · 77ebe09f
      Sam Tsai authored
      Summary:
      1. Add a keypoint metadata registry for registering different keypoint metadata
      2. Add option to inject_coco_dataset for adding keypoint metadata
      
      Reviewed By: newstzpz
      
      Differential Revision: D27730541
      
      fbshipit-source-id: c6ba97f60664fce4dcbb0de80222df7490bc6d5d
      77ebe09f
  23. 15 Apr, 2021 1 commit
  24. 30 Mar, 2021 1 commit
    • Sam Tsai's avatar
      reorganize unit tests · a0658c4a
      Sam Tsai authored
      Summary: Separate unit tests into individual folder based on functionality.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D27132567
      
      fbshipit-source-id: 9a8200be530ca14c7ef42191d59795b05b9800cc
      a0658c4a