1. 20 Oct, 2021 1 commit
    • Peizhao Zhang's avatar
      Refactored qat related code. · ef9c20cc
      Peizhao Zhang authored
      Summary:
      Refactored qat related code.
      * Moved `_prepare_model_for_qat` related code to a function.
      * Moved `_setup_non_qat_to_qat_state_dict_map` related code to a function.
      * Moved QATHook related code to the quantization file and implemented as a class.
      
      Differential Revision: D31370819
      
      fbshipit-source-id: 836550b2c8d68cd93a84d5877ad9cef6f0f0eb39
      ef9c20cc
  2. 19 Apr, 2021 1 commit
    • Peizhao Zhang's avatar
      Added hooks to report training progress to fblearner and keep alive. · bd6043ee
      Peizhao Zhang authored
      Summary:
      * Added a registry to register functions that could be used to register hooks for training.
        * TRAINER_HOOKS_REGISTRY: List of functions to add hooks for trainer, all functions in the registry will be called to add hooks
        * `func(hooks: List[HookBase]) -> None`
      
      Reviewed By: zhanghang1989
      
      Differential Revision: D27560806
      
      fbshipit-source-id: fcfa02623bfd08508b6083db2d318d08f7e3c0b8
      bd6043ee
  3. 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
  4. 24 Mar, 2021 1 commit
    • Kai Zhang's avatar
      Simplify Lightning task and model creation · 9051f71a
      Kai Zhang authored
      Summary:
      Given that the way to create D2 (https://github.com/facebookresearch/d2go/commit/465cdb842513eb910aa20fcedea1d2edd15dc7b7)go runner and Lightning task are different, get_class was introduced so that in application we could do:
      ```
      if is Lightning:
          task_cls = get_class(classname)
          task = task_cls(cfg)
      else:
          runner = create_runner(classname)
      ```
      It turns out that we could need to do that in many places: workflow, binaries.
      This diff revert `get_class` and return class in `create_runner` if the class is a Lightning module.
      
      Reviewed By: newstzpz
      
      Differential Revision: D26676595
      
      fbshipit-source-id: c3ce2016d09fe073af4c2dd9f98eea4e59ca621b
      9051f71a
  5. 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
  6. 03 Mar, 2021 1 commit