1. 19 Jul, 2022 1 commit
  2. 14 Jul, 2022 4 commits
  3. 13 Jul, 2022 2 commits
  4. 09 Jul, 2022 1 commit
  5. 08 Jul, 2022 3 commits
  6. 06 Jul, 2022 2 commits
  7. 02 Jul, 2022 1 commit
  8. 30 Jun, 2022 2 commits
  9. 29 Jun, 2022 2 commits
  10. 28 Jun, 2022 2 commits
  11. 27 Jun, 2022 1 commit
  12. 24 Jun, 2022 3 commits
    • Yanghan Wang's avatar
      better organize builtin runner's default config · 07eb7a1e
      Yanghan Wang authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/313
      
      It's not natural to put runner's default config functions under `d2go/utils/`, move them to `d2go/runner/config_defaults.py` and clean things up. This also reduce the inter-sub-package dependencies.
      
      Reviewed By: mattcyu1
      
      Differential Revision: D37407078
      
      fbshipit-source-id: 432644bee4f12306a14bac3dba76ced08b3683aa
      07eb7a1e
    • Mik Vyatskov's avatar
      Only save results to file from rank 0 · f0297b81
      Mik Vyatskov authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/309
      
      Right now multiple machines can try to write to the same output file,
      since they get the same argument. Additionally, on the same machine, several
      outputs can be saved which requires unncessary unpacking. This change makes
      train_net only write output of the rank 0 trainer.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D37310084
      
      fbshipit-source-id: 9d5352a274e8fb1d2043393b12896d402333c17b
      f0297b81
    • Yanghan Wang's avatar
      use runner class instead of instance outside of main · 8051775c
      Yanghan Wang authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/312
      
      As discussed, we decided to not use runner instance outside of `main`, previous diffs already solved the prerequisites, this diff mainly does the renaming.
      - Use runner name (str) in the fblearner, ML pipeline.
      - Use runner name (str) in FBL operator, MAST and binary operator.
      - Use runner class as the interface of main, it can be either the name of class (str) or actual class. The main usage should be using `str`, so that the importing of class happens inside `main`. But it's also a common use case to import runner class and call `main` for things like ad-hoc scripts or tests, supporting actual class makes it easier modify code for those cases (eg. some local test class doesn't have a name, so it's not feasible to use runner name).
      
      Reviewed By: newstzpz
      
      Differential Revision: D37060338
      
      fbshipit-source-id: 879852d41902b87d6db6cb9d7b3e8dc55dc4b976
      8051775c
  13. 22 Jun, 2022 2 commits
  14. 21 Jun, 2022 2 commits
  15. 20 Jun, 2022 1 commit
  16. 18 Jun, 2022 2 commits
  17. 17 Jun, 2022 3 commits
  18. 16 Jun, 2022 6 commits
    • Yanghan Wang's avatar
      support for using config file with _DEFAULTS_ via cli · 521b3cad
      Yanghan Wang authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/271
      
      - set `get_default_cfg = None` to opt-in this new feature.
      - support config with `_DEFAULTS_` when loading config file. Note that we don't check explicitly `"_DEFAULTS_" in config file` but check `runner.get_default_cfg == None`, this is because runner having `get_default_cfg` and config having `_DEFAULTS_` should be mutually exclusive, and `load_full_config_from_file` can raise proper error if `_DEFAULTS_` is missing.
      - we also need to save `_DEFAULTS_` in the diff config.
      
      Reviewed By: tglik
      
      Differential Revision: D36868581
      
      fbshipit-source-id: e0e19309c3df5a85383ce1454b321a68d0868dc4
      521b3cad
    • Yanghan Wang's avatar
      restructure lightning related code · 318a3d79
      Yanghan Wang authored
      Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/237
      
      Reviewed By: tglik
      
      Differential Revision: D35954531
      
      fbshipit-source-id: b69c8065928fe385d29f20f2c2460d60d63fca00
      318a3d79
    • Matthew Yu's avatar
      add modeling hook algo and helper · f3fc01aa
      Matthew Yu authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/299
      
      This implements the first iteration of generalized distillation in D2 (https://github.com/facebookresearch/d2go/commit/87374efb134e539090e0b5c476809dc35bf6aedb)Go. The functionality is separated into the following:
      
      => Adding distillation functionality without user changing their meta architecture:
      
      class DistillationModelingHook
      * This is an implementation detail that we hide from the user.
      * We use dynamic mixin to specify additional functionality to the user's model. In this way, the original (student) model retains all attributes but the mixin class will override the forward (and provide more functionality like teacher updates).
      * Teacher build currently only supports loading a torchscript model, pytorch compatiblity in later diffs
      
      => Implementing distillation methods
      
      class DistillationAlgorithm
      * The user can use some default algorithm (e.g., LabelDistillation) or create their own. This is where we specify the overrided forward func of the model and any other distillation requirements (updating the weights of the teacher model).
      * The basic LabelDistillation allows a user to use a teacher model during training to relabel the gt
      
      => User customization
      
      class DistillationHelper
      * This is what we expect the user to customize. As an example the user probably needs to write their own pseudo_labeler to take batched_inputs and relabel this with the teacher
      
      Both DistillationHelper and DistillationAlgorithm use a registry so that users can add their customization in their own code and use these customizations by specifying in the config
      
      Reviewed By: newstzpz
      
      Differential Revision: D36708227
      
      fbshipit-source-id: bc427c5d42d0c7ff4d839bf10782efac24dea107
      f3fc01aa
    • Miquel Jubert Hermoso's avatar
      Hardcode top-level directory, remove import for resource access · ce776f7d
      Miquel Jubert Hermoso authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/229
      
      *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.*
      
      This diff changes the import paths being rerouted in the d2go package. Instead of local-importing the package, which creates a buck circular dependency, we can hardcode the top-level path. We know it is fixed because we are defining it with base_module.
      
      For the other packages it can remain as-is.
      
      Also add some dependencies annotations in preparation for the buckification, with manual.
      
      Reviewed By: wat3rBro
      
      Differential Revision: D35928513
      
      fbshipit-source-id: 756c95740bab519e8093d254bcee64692e1a1b98
      ce776f7d
    • Mik Vyatskov's avatar
      Implement a central helper for converting arguments to CLI args · 3b64e76a
      Mik Vyatskov authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/301
      
      This is a follow-up of earlier work to extract part responsible for the
      centrally defined parameters from the helper in train_net closer to where the
      parameters are defined.
      
      Reviewed By: tglik
      
      Differential Revision: D37176212
      
      fbshipit-source-id: 226415f36f4872ac3d9ba41541b4389a18cc11e6
      3b64e76a
    • Mircea Cimpoi's avatar
      Refactor quantization logic to separate function · 5654d831
      Mircea Cimpoi authored
      Summary:
      Pull Request resolved: https://github.com/facebookresearch/d2go/pull/296
      
      Extract the model quantization logic to separate function.
      +minor cleanup (remove unused imports, f-strings)
      
      Reviewed By: wat3rBro
      
      Differential Revision: D36999434
      
      fbshipit-source-id: 7aad64921b8cdf8779527c19b077ee788403c6b8
      5654d831