- 26 Apr, 2022 4 commits
-
-
Yanghan Wang authored
Reviewed By: tglik Differential Revision: D35910666 fbshipit-source-id: 8225aca6696484dcc78e91ce50b936e1bee086d1
-
Tsahi Glik authored
Summary: Add support for apply "sandwitch rule" in supernet training, which uses the max and min subnets in each training step. Also fix some issues with config logging when using SearchSpace. Reviewed By: zhanghang1989 Differential Revision: D33676025 fbshipit-source-id: 753a1509bf592e7470ada360815447a3f52d06c7
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/221 Reviewed By: tglik Differential Revision: D35855051 fbshipit-source-id: f742dfbc91bb7a20f632a508743fa93e3a7e9aa9
-
Jonathan Zeltser authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/202 This diff print the diff between the default config and the full config at the start of the run Reviewed By: wat3rBro Differential Revision: D35346096 fbshipit-source-id: 1ce9b58a8d613d1dd572358ce1e51462c90cb337
-
- 25 Apr, 2022 2 commits
-
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/220 Differential Revision: D35853885 fbshipit-source-id: 08d5188d8cd7310f306d07e22cee96bc4d7e06c8
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/219 Differential Revision: D35850445 fbshipit-source-id: e69c0547603dea785d90401bd6128f8a2c2b194f
-
- 22 Apr, 2022 1 commit
-
-
Xiaoliang Dai authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/218 Reviewed By: newstzpz Differential Revision: D35084145 fbshipit-source-id: f655b1a1cfa813f99e51f2d4527a6e480ef8608d
-
- 21 Apr, 2022 2 commits
-
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/215 Follow up the comment in D35631192 (https://github.com/facebookresearch/d2go/commit/3204f147d67fb2ce7ac2600c46708195c15bfa3a). The current `get_learnable_qat_qconfig` implementation mimics the default get qconfig functions, as commented "follow `default_per_channel_weight_fake_quant`", etc. Instead of creating custom qconfig from scratch, this diff change it to convert an existing qconfig to learnable, so that this process is transparent to the orthogonal change on the qconfig (eg. symmetric qscheme or new backend). The following shows the difference between learnable and non-learnable `QConfig` for `qnnpack` and `fbgemm`, the actual difference is just adding `use_grad_scaling=True` and change FakeQuant type from `FusedMovingAvgObsFakeQuantize` to `_LearnableFakeQuantize`. (maybe more obvious to copy to text editor compare show side-by-side) ```` qat_utils.get_learnable_qat_qconfig("qnnpack") QConfig( activation=functools.partial( <class 'torch.ao.quantization._learnable_fake_quantize._LearnableFakeQuantize'>, observer=<class 'torch.ao.quantization.observer.MovingAverageMinMaxObserver'>, quant_min=0, quant_max=255, use_grad_scaling=True, reduce_range=False ){}, weight=functools.partial( <class 'torch.ao.quantization._learnable_fake_quantize._LearnableFakeQuantize'>, observer=<class 'torch.ao.quantization.observer.MovingAverageMinMaxObserver'>, quant_min=-128, quant_max=127, dtype=torch.qint8, use_grad_scaling=True, qscheme=torch.per_tensor_symmetric, reduce_range=False ){} ) torch.ao.quantization.get_default_qat_qconfig("qnnpack") QConfig( activation=functools.partial( <class 'torch.ao.quantization.fake_quantize.FusedMovingAvgObsFakeQuantize'>, observer=<class 'torch.ao.quantization.observer.MovingAverageMinMaxObserver'>, quant_min=0, quant_max=255, reduce_range=False ){}, weight=functools.partial( <class 'torch.ao.quantization.fake_quantize.FusedMovingAvgObsFakeQuantize'>, observer=<class 'torch.ao.quantization.observer.MovingAverageMinMaxObserver'>, quant_min=-128, quant_max=127, dtype=torch.qint8, qscheme=torch.per_tensor_symmetric, ){} ) qat_utils.get_learnable_qat_qconfig("fbgemm") QConfig( activation=functools.partial( <class 'torch.ao.quantization._learnable_fake_quantize._LearnableFakeQuantize'>, observer=<class 'torch.ao.quantization.observer.MovingAverageMinMaxObserver'>, quant_min=0, quant_max=255, use_grad_scaling=True, reduce_range=True ){}, weight=functools.partial( <class 'torch.ao.quantization._learnable_fake_quantize._LearnableFakeQuantize'>, observer=<class 'torch.ao.quantization.observer.MovingAveragePerChannelMinMaxObserver'>, quant_min=-128, quant_max=127, dtype=torch.qint8, use_grad_scaling=True, qscheme=torch.per_channel_symmetric, reduce_range=False, ch_axis=0 ){} ) torch.ao.quantization.get_default_qat_qconfig("fbgemm") QConfig( activation=functools.partial( <class 'torch.ao.quantization.fake_quantize.FusedMovingAvgObsFakeQuantize'>, observer=<class 'torch.ao.quantization.observer.MovingAverageMinMaxObserver'>, quant_min=0, quant_max=255, reduce_range=True ){}, weight=functools.partial( <class 'torch.ao.quantization.fake_quantize.FusedMovingAvgObsFakeQuantize'>, observer=<class 'torch.ao.quantization.observer.MovingAveragePerChannelMinMaxObserver'>, quant_min=-128, quant_max=127, dtype=torch.qint8, qscheme=torch.per_channel_symmetric ){} ) ``` Reviewed By: kimishpatel Differential Revision: D35772970 fbshipit-source-id: 0be8057e4f7ce3b315bd66d77aa88b733b676223
-
Owen Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/216 Sanity check after augment with bundled inputs fails unless tensor is moved to the correct backend. Fix warning where "-metal" or "-vulkan" is not correctly removed from the string. Temporary fix: Remove the call to augment with bundled inputs, because Metal backend for iOS GPU is not available on devserver. The true fix to unblock bundled inputs will be to add an input preformatting step op into metal models to convert input to Metal tensors (and no-op if already a metal tensor). This is outside the scope of this diff. Reviewed By: ymao1993 Differential Revision: D35574266 fbshipit-source-id: 9f7b5c72dff2e3cf0eddf871379b079a1ec658ff
-
- 19 Apr, 2022 2 commits
-
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/210 Reviewed By: kimishpatel Differential Revision: D35631192 fbshipit-source-id: a713d86734c6937c16c7ced705171db9ea2f0894
-
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
-
- 15 Apr, 2022 2 commits
-
-
Zecheng He authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/211 Align_core cannot be set if the mode is nearest. Change to default None. Reviewed By: wat3rBro Differential Revision: D35681284 fbshipit-source-id: 23c57112e588c0b4ac5facfd61a7af0aa8a07ef0
-
Yanghan Wang authored
Summary: X-link: https://github.com/facebookresearch/detectron2/pull/4132 X-link: https://github.com/fairinternal/detectron2/pull/568 Pull Request resolved: https://github.com/facebookresearch/d2go/pull/203 For full discussion: https://fb.workplace.com/groups/1405155842844877/posts/5744470455580039 Tracing the `.to(device)` will cause problem when moving the traced torchscript to another device (eg. from cpu to gpu, or even, from `cuda:0` to `cuda:1`). The reason is that `device` is not a `torch.Tensor`, so the tracer just hardcode the value during tracing. The solution is scripting the casting operation. Here's the code snippet illustrating this: ``` # define the MyModel similar to GeneralizedRCNN, which casts the input to the model's device class MyModel(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(3, 20, 5) self.conv2 = nn.Conv2d(20, 20, 5) def forward(self, x): # cast the input to the same device as this model, this makes it possible to # take a cpu tensor as input when the model is on GPU. x = x.to(self.conv1.weight.device) x = F.relu(self.conv1(x)) return F.relu(self.conv2(x)) # export the model by tracing model = MyModel() x = torch.zeros([1, 3, 32, 32]) ts = torch.jit.trace(model, x) print(ts.graph) # ===================================================== graph(%self.1 : __torch__.MyModel, %x : Float(1, 3, 32, 32, strides=[3072, 1024, 32, 1], requires_grad=0, device=cpu)): %conv2 : __torch__.torch.nn.modules.conv.___torch_mangle_0.Conv2d = prim::GetAttr[name="conv2"](%self.1) %conv1 : __torch__.torch.nn.modules.conv.Conv2d = prim::GetAttr[name="conv1"](%self.1) %14 : int = prim::Constant[value=6]() # <ipython-input-2-5abde0efc36f>:11:0 %15 : int = prim::Constant[value=0]() # <ipython-input-2-5abde0efc36f>:11:0 %16 : Device = prim::Constant[value="cpu"]() # <ipython-input-2-5abde0efc36f>:11:0 %17 : NoneType = prim::Constant() %18 : bool = prim::Constant[value=0]() # <ipython-input-2-5abde0efc36f>:11:0 %19 : bool = prim::Constant[value=0]() # <ipython-input-2-5abde0efc36f>:11:0 %20 : NoneType = prim::Constant() %input.1 : Float(1, 3, 32, 32, strides=[3072, 1024, 32, 1], requires_grad=0, device=cpu) = aten::to(%x, %14, %15, %16, %17, %18, %19, %20) # <ipython-input-2-5abde0efc36f>:11:0 %72 : Tensor = prim::CallMethod[name="forward"](%conv1, %input.1) %input.5 : Float(1, 20, 28, 28, strides=[15680, 784, 28, 1], requires_grad=1, device=cpu) = aten::relu(%72) # /mnt/xarfuse/uid-20293/a90d1698-seed-nspid4026533681_cgpid21128615-ns-4026533618/torch/nn/functional.py:1406:0 %73 : Tensor = prim::CallMethod[name="forward"](%conv2, %input.5) %61 : Float(1, 20, 24, 24, strides=[11520, 576, 24, 1], requires_grad=1, device=cpu) = aten::relu(%73) # /mnt/xarfuse/uid-20293/a90d1698-seed-nspid4026533681_cgpid21128615-ns-4026533618/torch/nn/functional.py:1406:0 return (%61) # ===================================================== # PyTorch cuda works model = copy.deepcopy(model) model.to("cuda") y = model(x) # torchscript cpu works y = ts(x) # torchscript cuda doesn't work ts = ts.to("cuda") y = ts(x) # ===================================================== RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-4-2aece3ad6c9a> in <module> 7 # torchscript cuda doesn't work 8 ts = ts.to("cuda") ----> 9 y = ts(x) /mnt/xarfuse/uid-20293/a90d1698-seed-nspid4026533681_cgpid21128615-ns-4026533618/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs) 1108 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks 1109 or _global_forward_hooks or _global_forward_pre_hooks): -> 1110 return forward_call(*input, **kwargs) 1111 # Do not call functions when jit is used 1112 full_backward_hooks, non_full_backward_hooks = [], [] RuntimeError: The following operation failed in the TorchScript interpreter. # ===================================================== # One solution is scripting the casting instead of tracing it, the folloing code demonstrate how to do it. We need to use mixed scripting/tracing torch.jit.script_if_tracing def cast_device_like(src: torch.Tensor, dst: torch.Tensor) -> torch.Tensor: return src.to(dst.device) class MyModel2(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(3, 20, 5) self.conv2 = nn.Conv2d(20, 20, 5) def forward(self, x): # cast the input to the same device as this model, this makes it possible to # take a cpu tensor as input when the model is on GPU. x = cast_device_like(x, self.conv1.weight) x = F.relu(self.conv1(x)) return F.relu(self.conv2(x)) # export the model by tracing model = MyModel2() x = torch.zeros([1, 3, 32, 32]) ts = torch.jit.trace(model, x) print(ts.graph) # ===================================================== graph(%self.1 : __torch__.MyModel2, %x : Float(1, 3, 32, 32, strides=[3072, 1024, 32, 1], requires_grad=0, device=cpu)): %conv2 : __torch__.torch.nn.modules.conv.___torch_mangle_5.Conv2d = prim::GetAttr[name="conv2"](%self.1) %conv1 : __torch__.torch.nn.modules.conv.___torch_mangle_4.Conv2d = prim::GetAttr[name="conv1"](%self.1) %conv1.1 : __torch__.torch.nn.modules.conv.___torch_mangle_4.Conv2d = prim::GetAttr[name="conv1"](%self.1) %weight.5 : Tensor = prim::GetAttr[name="weight"](%conv1.1) %14 : Function = prim::Constant[name="cast_device_like"]() %input.1 : Tensor = prim::CallFunction(%14, %x, %weight.5) %68 : Tensor = prim::CallMethod[name="forward"](%conv1, %input.1) %input.5 : Float(1, 20, 28, 28, strides=[15680, 784, 28, 1], requires_grad=1, device=cpu) = aten::relu(%68) # /mnt/xarfuse/uid-20293/a90d1698-seed-nspid4026533681_cgpid21128615-ns-4026533618/torch/nn/functional.py:1406:0 %69 : Tensor = prim::CallMethod[name="forward"](%conv2, %input.5) %55 : Float(1, 20, 24, 24, strides=[11520, 576, 24, 1], requires_grad=1, device=cpu) = aten::relu(%69) # /mnt/xarfuse/uid-20293/a90d1698-seed-nspid4026533681_cgpid21128615-ns-4026533618/torch/nn/functional.py:1406:0 return (%55) # ===================================================== # PyTorch cuda works model = copy.deepcopy(model) model.to("cuda") y = model(x) # torchscript cpu works y = ts(x) # Note that now torchscript cuda works ts = ts.to("cuda") y = ts(x) print(y.device) # ===================================================== cuda:0 # ===================================================== ``` For D2 (https://github.com/facebookresearch/d2go/commit/87374efb134e539090e0b5c476809dc35bf6aedb), this diff creates a `move_tensor_device_same_as_another(A, B)` function to replace `A.to(B.device)`. This diff updates the `rcnn.py` and all its utils. For D2 (https://github.com/facebookresearch/d2go/commit/87374efb134e539090e0b5c476809dc35bf6aedb)Go, since the exported model will become device-agnostic, we can remove the "_gpu" from predictor-type. Update (April 11): Add test to cover tracing on one device and move traced model to another device for inference. When GPU is available, it'll trace on `cuda:0` and run inference on `cpu`, `cuda:0` (and `cuda:N-1` if available). Summary of the device related patterns - The usage of `.to(dtype=another_dype)` won't affect device. - Explicit device casting like `.to(device)` can be generally replaced by `move_device_like`. - For creating variable directly on device (eg. `torch.zeros`, `torch.arange`), we can replace then with ScriptModule to avoid first create on CPU and then move to new device. - Creating things on tracing device and then moving to new device is dangerous, because tracing device (eg. `cuda:0`) might not be available (eg. running on CPU-only machine). - It's hard to write `image_list.py` in this pattern because the size behaves differently during tracing (int vs. scalar tensor), in this diff, still create on CPU first and then move to target device. Reviewed By: tglik Differential Revision: D35367772 fbshipit-source-id: 02d07e3d96da85f4cfbeb996e3c14c2a6f619beb
-
- 12 Apr, 2022 1 commit
-
-
Pavel Pidlypenskyi authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/204 Having additional train hooks is a nice feature to have, especially when one wants to add some training metrics via hooks. Reviewed By: tglik Differential Revision: D35377418 fbshipit-source-id: ca8e00a3c64f992fe9f6975689e50a8b846a1a37
-
- 07 Apr, 2022 1 commit
-
-
Owen Wang authored
Summary: Allow string name of export type to indicate which mobile opt backend user wants to trigger. Reviewed By: wat3rBro Differential Revision: D35375928 fbshipit-source-id: dc3f91564681344e1d43862423ab5dc63b6644d3
-
- 05 Apr, 2022 2 commits
-
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/200 Currently when exporting the RCNN model, we call it with `self.model.inference(inputs, do_postprocess=False)[0]`, therefore the output of exported model is not post-processed, eg. the mask is in the squared shape. This diff adds the option to include postprocess in the exported model. Worth noting that since the input is a single tensor, the post-process doesn't resize the output to original resolution, and we can't apply the post-process twice to further resize it in the Predictor's PostProcessFunc, add an assertion to raise error in this case. But this is fine for most production use cases where the input is not resized. Set `RCNN_EXPORT.INCLUDE_POSTPROCESS` to `True` to enable this. Reviewed By: tglik Differential Revision: D34904058 fbshipit-source-id: 65f120eadc9747e9918d26ce0bd7dd265931cfb5
-
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
-
- 31 Mar, 2022 1 commit
-
-
Michael Snower authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/201 Adds profiler registry. Reviewed By: Maninae, wat3rBro Differential Revision: D34725664 fbshipit-source-id: 52cb99b618e5ba5f9bd8d272d4dcaa770d66983a
-
- 30 Mar, 2022 1 commit
-
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/198 Differential Revision: D35223296 fbshipit-source-id: 098fc148bc1cea59490cd70ef6f122062b2de7a6
-
- 28 Mar, 2022 1 commit
-
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/195 Update: The problem is solved by: https://github.com/pytorch/pytorch/issues/74779 This diff only adds the step to show the env, so it's easier to report bug in the future. Reviewed By: tglik Differential Revision: D35150748 fbshipit-source-id: 1f648ec5abb9f3563445cca26cc53b5f7e03bf2c
-
- 25 Mar, 2022 1 commit
-
-
Ananth Subramaniam authored
Reviewed By: wat3rBro Differential Revision: D34813614 fbshipit-source-id: e062cf5e1cbee09bb1970a21d21bc4132aec0890
-
- 24 Mar, 2022 4 commits
-
-
Tsahi Glik authored
Summary: Tweak exporter and evaluator cli entry point func to support calling it as a module with args from custom launching code. Reviewed By: sstsai-adl Differential Revision: D35035813 fbshipit-source-id: c8b24099e94ccc58c184f8aac95b2a24a137e86a
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/191 When exporting model to torchscript (using `MODEL.DEVICE = "cpu"`), mean/std are constant instead of model parameters. Therefore after casting the torchscript to CUDA, the mean/std remains on cpu. This will cause problem when running inference on GPU. The fix is exporting the model with `MODEL.DEVICE = "cuda"`. However D2 (https://github.com/facebookresearch/d2go/commit/87374efb134e539090e0b5c476809dc35bf6aedb)Go internally uses "cpu" during export (via cli: https://fburl.com/code/4mpk153i, via workflow: https://fburl.com/code/zcj5ud4u) by default. For CLI, user can manually set `--device`, but for workflow it's hard to do so. Further more it's hard to support mixed model using single `--device` option. So this diff adds a special handling in the RCNN's `default_prepare_for_export` to bypass the `--device` option. Reviewed By: zhanghang1989 Differential Revision: D35097613 fbshipit-source-id: df9f44f49af1f0fd4baf3d7ccae6c31e341f3ef6
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/193 - Add daily CI. - rename `Unit Test` to `CI`. - rename the `build` to `python-unittest`. Reviewed By: tglik Differential Revision: D35102575 fbshipit-source-id: cbcc3992e019d3e00d8e862b81de4bb1c16f8fe1
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/192 Nowadays lightning will initialize process group when using ddp strategy, since `TestLightningTrainNet` does a training with ddp strategy (https://fburl.com/code/a9yp0kzy), the process group ended up initialized after running the test. However there're other tests that will also set up ddp and thus expect non-initialized process group, this is not a problem on sandcastle since the tests run separately, however in OSS env, the tests are running together, so the error happens (eg. https://github.com/facebookresearch/d2go/runs/5668912203?check_suite_focus=true). This diff adds a clean up step in `TestLightningTrainNet`. Reviewed By: tglik Differential Revision: D35099944 fbshipit-source-id: f5b42b2a87d4efd9aa0ed97e6bd2140d80ab9522
-
- 22 Mar, 2022 1 commit
-
-
Owen Wang authored
Summary: Detectron2[Go]'s Visualizer and sem_seg_evaluation now updated with customization entrypoints for how to handle reading semantic seg masks. By default, PIL and PNG images are expected. However, some specific projects' datasets use .npy files and this customization allows providing an alternate Visualizer and evaluation function for reading them. Reviewed By: newstzpz Differential Revision: D33434948 fbshipit-source-id: 42af16d6708ffc5b2c03ec8507757313e23c8204
-
- 21 Mar, 2022 1 commit
-
-
Hang Zhang authored
Summary: rm TARGET in gitignore Reviewed By: newstzpz Differential Revision: D35014854 fbshipit-source-id: 4a28f797bd5277eb58df6921f3ae9b7debb65f71
-
- 18 Mar, 2022 1 commit
-
-
Owen Wang authored
Summary: Add documentation on the pre and post processing functions for segmentation. Reviewed By: XiaoliangDai Differential Revision: D34882165 fbshipit-source-id: 375c62d0ad632a40b6557065b3362e333df8c55f
-
- 17 Mar, 2022 1 commit
-
-
Yanghan Wang authored
Summary: - remove the `None` support for `merge_from_list` - fix logging when initializing diskcacje - Don't inherit `_FakeListObj` fron `list`, so looping over it can raise error. Reviewed By: sstsai-adl Differential Revision: D34952714 fbshipit-source-id: f636e408b79ed77904f257f189fcef216cb2efbc
-
- 16 Mar, 2022 4 commits
-
-
Tsahi Glik authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/190 Currently there is some fragmentation in export for how to apply convert logic in various mode. `prepare_for_quant_convert` is only called in non eager modes and the logic in eager mode is not customizable. This diff unify the `prepare_for_quant_convert` code path for all quantization modes. Also in this diff we rename `_non_qat_to_qat_state_dict_map`, that is use in qat checkpointer to be publish var `non_qat_to_qat_state_dict_map` and allow models to populate it with custom mapping. This is useful in cases where the param mapping between the non qat model and the qat model cannot be inferred definitely (see note in https://fburl.com/code/9rx172ht) and have some ambiguity that can only be resolved by the model logic. Reviewed By: wat3rBro Differential Revision: D34741217 fbshipit-source-id: 38edfec64200ec986ffe4f3d47f527cb6a3fb5e9
-
Yanghan Wang authored
Summary: D33301363 changes the signature of `update_cfg` from `update_cfg(cfg, *updaters)` to `update_cfg(cfg, updaters, new_allowed)`, while the call sites are not updated. Eg. https://www.internalfb.com/code/fbsource/[9e071979a62ba7fd3d7a71dee1f0809815cbaa43]/fbcode/fblearner/flow/projects/mobile_vision/detectron2go/core/workflow.py?lines=221-225, the `merge_from_list_updater(e2e_train.overwrite_opts),` is then not used. For the fix: - Since there're a lot of call sites for `update_cfg` it's better to keep the original signature. - ~~~The `new_allowed` can actually be passed to each individual updater instead of the `update_cfg`, this also gives finer control.~~~ - Make override the `merge_from_list` to make it respect `new_allowed`. - Preserve the `new_allowed` for all nodes (not only the root) in the FLOW Future calls. Reviewed By: zhanghang1989 Differential Revision: D34840001 fbshipit-source-id: 14aff6bec75a8b53d4109e6cd73d2494f68863b4
-
Chengjiang Long authored
Summary: Dataloader: Rewrote the data loader via build_stream_dataset_reader with the DATASET_DEFINITION of "peopleai_face_eng_inference_results". User Calibration Model (initial version): nn.Sequential( nn.Conv1d(72, 128, 1), nn.BatchNorm1d(128), nn.ReLU(), nn.Flatten(), nn.Linear(128, 72), ) Differential Revision: D34202009 fbshipit-source-id: 55a2c579e463ed19eac38b5dd12e11c09cbccc11 -
Ananth Subramaniam authored
Reviewed By: kazhang Differential Revision: D34669519 fbshipit-source-id: 8cfee968104c823a55960f2730d8e888ac1f298e
-
- 10 Mar, 2022 1 commit
-
-
Haroun Habeeb authored
Summary: see https://fb.workplace.com/notes/3006074566389155 ---- did the integration test not catch this? Reviewed By: ananthsub, tangbinh Differential Revision: D34665501 fbshipit-source-id: ff2cbfa9462f131455dce46a0c413c4c69105f48
-
- 09 Mar, 2022 1 commit
-
-
Binh Tang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/189 X-link: https://github.com/facebookresearch/recipes/pull/14 X-link: https://github.com/facebookresearch/ReAgent/pull/616 ### New commit log messages - [9b011606f Add callout items to the Docs landing page (#12196)](https://github.com/PyTorchLightning/pytorch-lightning/pull/12196) Reviewed By: edward-io Differential Revision: D34687261 fbshipit-source-id: 3ef6be5169a855582384f9097a962d2261625882
-
- 08 Mar, 2022 2 commits
-
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/187 Reviewed By: ananthsub, zhanghang1989 Differential Revision: D34650467 fbshipit-source-id: b9518e5dd673b709320b87e57a43d053eca3aabe
-
Ananth Subramaniam authored
Reviewed By: tangbinh Differential Revision: D34669294 fbshipit-source-id: c87bc1d4c589518f7c9fc21e6dfe27b03e700b6d
-
- 07 Mar, 2022 1 commit
-
-
Yanghan Wang authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/186 Reviewed By: zhanghang1989 Differential Revision: D34648894 fbshipit-source-id: 51e4ea978b84a81f7e4dd91800b75a916da08faa
-
- 05 Mar, 2022 2 commits
-
-
Yanghan Wang authored
Summary: fix D34540275 (https://github.com/facebookresearch/d2go/commit/d8bdc633ec66e6ce73076d027f8e777791c2e067) Reviewed By: tglik Differential Revision: D34662745 fbshipit-source-id: 6fd67db041fab6f5810763702e4cc3f16a08c5df
-
Ananth Subramaniam authored
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/188 Reviewed By: tangbinh, wat3rBro Differential Revision: D34658350 fbshipit-source-id: 36e8c1e8c5dab97990b1d9a5b1a58667e0e3c455
-