1. 12 Jan, 2024 1 commit
    • Kapil Krishnakumar's avatar
      consolidate deterministic settings · 573bd454
      Kapil Krishnakumar authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/644
      
      This diff consolidates deterministic settings in D2Go. In the `default_runner.py` file, the `torch.set_float32_matmul_precision("highest")` function is added to set the precision for matrix multiplication to the highest possible value. In the `setup.py` file, the `torch.backends.cudnn.deterministic` setting is set to `True` and the `torch.backends.cudnn.allow_tf32` setting is set to `False` to avoid random pytorch and CUDA algorithms during the training. The `torch.backends.cuda.matmul.allow_tf32` setting is also set to `False` to avoid random matrix multiplication algorithms. Additionally, the `seed` function is used to set the seed for reproducibility.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D51796739
      
      fbshipit-source-id: 50e44ea50b0311b56a885db9f633491ac3002bd4
      573bd454
  2. 05 Jan, 2023 1 commit
  3. 04 Jan, 2023 1 commit
    • Yanghan Wang's avatar
      upgrade pytorch-lightning version to 1.8.6 · 9e93852d
      Yanghan Wang authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/453
      
      Previous diffs updated the LRScheduler to public version (eg. https://github.com/facebookresearch/detectron2/pull/4709), this also requires newer version of pytorch-lightning. This diff upgrades the lightning version to 1.8.6, also fixes some deprecated call sites of old lightning versions.
      - `deepcopy` seems to be supported now, remove `_deepcopy` (there's now not allowed to access `trainer` attributed when it is `None`)
      - `dataloader_idx` is removed from `on_train_batch_start`.
      - stop using `_accelerator_connector` (the AcceleratorConnector doesn't have those attributes anymore).
      - deprecated `on_pretrain_routine_end` -> `on_fit_start`
      
      Reviewed By: YanjunChen329
      
      Differential Revision: D42319019
      
      fbshipit-source-id: ba46abbd98da96783e15d187a361fda47dc7d4d6
      9e93852d
  4. 31 May, 2022 1 commit
    • Yanghan Wang's avatar
      fix protobuf version issue · 3a89f35a
      Yanghan Wang authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/266
      
      CI has issue (eg. https://github.com/facebookresearch/d2go/runs/6662620169?check_suite_focus=true):
      ```
        File "/usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/caffe2/proto/__init__.py", line 15, in <module>
          from caffe2.proto import caffe2_pb2, metanet_pb2, torch_pb2
        File "/usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/caffe2/proto/caffe2_pb2.py", line 33, in <module>
          _descriptor.EnumValueDescriptor(
        File "/usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 755, in __new__
          _message.Message._CheckCalledFromGeneratedFile()
      TypeError: Descriptors cannot not be created directly.
      If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
      If you cannot immediately regenerate your protos, some other possible workarounds are:
       1. Downgrade the protobuf package to 3.20.x or lower.
       2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
      
      More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
      ```
      
      It's caused by BC-breaking change of protobuf, fix the version.
      
      Reviewed By: tglik
      
      Differential Revision: D36781162
      
      fbshipit-source-id: 8f13461a44a5a8f01abdc09a1ff8f9759fe55619
      3a89f35a
  5. 15 May, 2022 1 commit
    • John Reese's avatar
      apply import merging for fbcode (7 of 11) · b3a9204c
      John Reese authored
      Summary:
      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: lisroach
      
      Differential Revision: D36402205
      
      fbshipit-source-id: a4efc688d02da80c6e96685aa8eb00411615a366
      b3a9204c
  6. 09 Mar, 2022 1 commit
  7. 08 Mar, 2022 1 commit
  8. 04 Mar, 2022 1 commit
    • Yanghan Wang's avatar
      delay import for discache · d3115faf
      Yanghan Wang authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/185
      
      The `DiskCachedDatasetFromList` was originally in the `d2go/data/utils.py`, so the class is declared by default. Therefore the clean up call (https://fburl.com/code/cu7hswhx) is always called even when the feature is not enabled. This diff move it to a new place and delay the import, so the clean up won't run.
      
      Reviewed By: tglik
      
      Differential Revision: D34601363
      
      fbshipit-source-id: 734bb9b2c7957d7437ad40c4bfe60a441ec2f23a
      d3115faf
  9. 28 Feb, 2022 1 commit
  10. 30 Dec, 2021 1 commit
  11. 09 Sep, 2021 1 commit
  12. 25 May, 2021 1 commit
    • 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
  13. 06 Apr, 2021 1 commit
  14. 29 Mar, 2021 1 commit
    • Yanghan Wang's avatar
      remove d2go.tests package from setup · bcc90f54
      Yanghan Wang authored
      Summary: all utils code are moved to d2go.utils.testing
      
      Reviewed By: newstzpz
      
      Differential Revision: D27209943
      
      fbshipit-source-id: 6c5cb14858155a8ed13478d65ee8e02ef74616d7
      bcc90f54
  15. 20 Mar, 2021 1 commit
    • Yanghan Wang's avatar
      move test utils to core library · 9d238344
      Yanghan Wang authored
      Summary: Not d2go.tests is not a library for oss, move utils code to d2go.utils.testing
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D26706933
      
      fbshipit-source-id: 85767b66bbb6c67db05e11823beb4840220b2aa3
      9d238344
  16. 03 Mar, 2021 1 commit