1. 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
  2. 28 May, 2022 1 commit
  3. 27 May, 2022 1 commit
  4. 26 May, 2022 1 commit
  5. 25 May, 2022 2 commits
  6. 23 May, 2022 2 commits
    • Miquel Jubert Hermoso's avatar
      Change reference from modeling to directly qconfig · 5f71fde2
      Miquel Jubert Hermoso authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/239
      
      *This diff is part of a stack which has the goal of "buckifying" D2 (https://github.com/facebookresearch/d2go/commit/87374efb134e539090e0b5c476809dc35bf6aedb)Go core and enabling autodeps and other tooling. The last diff in the stack introduces the TARGETS. The diffs earlier in the stack are resolving circular dependencies and other issues which prevent the buckification from occurring.*
      
      Break cyclic dependency by referring directly to the source file, instead to a different file that imports it.
      
      Reviewed By: tglik
      
      Differential Revision: D36166602
      
      fbshipit-source-id: 7deafc02a52ab978a21593184d1b3d3810dc9346
      5f71fde2
    • Miquel Jubert Hermoso's avatar
      Reformat d2go_dataset_mapper to break circular dependency · ca094a0a
      Miquel Jubert Hermoso authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/225
      
      *This diff is part of a stack which has the goal of "buckifying" D2 (https://github.com/facebookresearch/d2go/commit/87374efb134e539090e0b5c476809dc35bf6aedb)Go core and enabling autodeps and other tooling. The last diff in the stack introduces the TARGETS. The diffs earlier in the stack are resolving circular dependencies and other issues which prevent the buckification from occurring.*
      
      The overriding pattern applied in d2go_dataset_mapper, with the d2go_dataset_mapper_impl and d2go_dataset_mapper_impl_fb makes it possible that internal users get the _fb behaviour and external users the regular one, with the same import. But, this makes it necessary to put both files in the same dependency.
      
      This causes a circular dependency. In general, one reasonable assumption is that fb-only dependencies can import oss dependencies but not vice versa. In the current setup, grouping both _impl files in a buck target makes that buck target contain both fb and oss code, and depend on both. This is causing circular buck dependency issues.
      
      To fix this, while keeping the transparent import behavior, the following changes are done:
      
      1. The implementation file is moved to a directory under .fb. It will have it's own target.
      2. The non-fb version is renamed to DualInputDatasetMapper, as per Yanghan's suggestion. This simplifies the change, since it seems the fb version's behavior is not used atm.
      3. d2go_dataset_mapper is moved to have the implementation itself
      
      Reviewed By: tglik
      
      Differential Revision: D35930993
      
      fbshipit-source-id: ac57337d221df24f53e360d5dcb38ffa4164fef5
      ca094a0a
  7. 21 May, 2022 1 commit
  8. 20 May, 2022 3 commits
  9. 19 May, 2022 5 commits
  10. 18 May, 2022 1 commit
  11. 17 May, 2022 5 commits
  12. 16 May, 2022 2 commits
  13. 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
  14. 14 May, 2022 2 commits
  15. 12 May, 2022 1 commit
    • John Reese's avatar
      formatting changes from black 22.3.0 · e1623106
      John Reese authored
      Summary:
      Applies the black-fbsource codemod with the new build of pyfmt.
      
      paintitblack
      
      Reviewed By: lisroach
      
      Differential Revision: D36324783
      
      fbshipit-source-id: 280c09e88257e5e569ab729691165d8dedd767bc
      e1623106
  16. 11 May, 2022 1 commit
  17. 10 May, 2022 1 commit
    • Tong Xiao's avatar
      Fix a bug in export api that prevents setting specific kwargs for different backends · 70f236a6
      Tong Xiao authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/236
      
      When exporting the model to different backend engines, users may set the `model_export_kwargs` for different backends.
      
      The torchscript backend needs a placeholder `**export_kwargs` to allow the kwargs for other backends.
      
      Frankly speaking, this mechanism of passing the same set of kwargs to different backends is confusing. Better to be refactored to the factory pattern with isolated kwargs.
      
      Reviewed By: HarounH, wat3rBro
      
      Differential Revision: D36140771
      
      fbshipit-source-id: f327559c1d063c9ce914a9afe2c1acf77c2aa287
      70f236a6
  18. 29 Apr, 2022 2 commits
  19. 26 Apr, 2022 4 commits
  20. 25 Apr, 2022 2 commits
  21. 22 Apr, 2022 1 commit