1. 12 Jul, 2022 1 commit
    • Nikhila Ravi's avatar
      Updates to support Accelerate and multigpu training (#37) · aa8b03f3
      Nikhila Ravi authored
      Summary:
      ## Changes:
      - Added Accelerate Library and refactored experiment.py to use it
      - Needed to move `init_optimizer` and `ExperimentConfig` to a separate file to be compatible with submitit/hydra
      - Needed to make some modifications to data loaders etc to work well with the accelerate ddp wrappers
      - Loading/saving checkpoints incorporates an unwrapping step so remove the ddp wrapped model
      
      ## Tests
      
      Tested with both `torchrun` and `submitit/hydra` on two gpus locally. Here are the commands:
      
      **Torchrun**
      
      Modules loaded:
      ```sh
      1) anaconda3/2021.05   2) cuda/11.3   3) NCCL/2.9.8-3-cuda.11.3   4) gcc/5.2.0. (but unload gcc when using submit)
      ```
      
      ```sh
      torchrun --nnodes=1 --nproc_per_node=2 experiment.py --config-path ./configs --config-name repro_singleseq_nerf_test
      ```
      
      **Submitit/Hydra Local test**
      
      ```sh
      ~/pytorch3d/projects/implicitron_trainer$ HYDRA_FULL_ERROR=1 python3.9 experiment.py --config-name repro_singleseq_nerf_test --multirun --config-path ./configs  hydra/launcher=submitit_local hydra.launcher.gpus_per_node=2 hydra.launcher.tasks_per_node=2 hydra.launcher.nodes=1
      ```
      
      **Submitit/Hydra distributed test**
      
      ```sh
      ~/implicitron/pytorch3d$ python3.9 experiment.py --config-name repro_singleseq_nerf_test --multirun --config-path ./configs  hydra/launcher=submitit_slurm hydra.launcher.gpus_per_node=8 hydra.launcher.tasks_per_node=8 hydra.launcher.nodes=1 hydra.launcher.partition=learnlab hydra.launcher.timeout_min=4320
      ```
      
      ## TODOS:
      - Fix distributed evaluation: currently this doesn't work as the input format to the evaluation function is not suitable for gathering across gpus (needs to be nested list/tuple/dicts of objects that satisfy `is_torch_tensor`) and currently `frame_data`  contains `Cameras` type.
      - Refactor the `accelerator` object to be accessible by all functions instead of needing to pass it around everywhere? Maybe have a `Trainer` class and add it as a method?
      - Update readme with installation instructions for accelerate and also commands for running jobs with torchrun and submitit/hydra
      
      X-link: https://github.com/fairinternal/pytorch3d/pull/37
      
      Reviewed By: davnov134, kjchalup
      
      Differential Revision: D37543870
      
      Pulled By: bottler
      
      fbshipit-source-id: be9eb4e91244d4fe3740d87dafec622ae1e0cf76
      aa8b03f3
  2. 06 Jul, 2022 4 commits
    • Jeremy Reizenstein's avatar
      extract camera_difficulty_bin_breaks · efb72132
      Jeremy Reizenstein authored
      Summary: As part of removing Task, move camera difficulty bin breaks from hard code to the top level.
      
      Reviewed By: davnov134
      
      Differential Revision: D37491040
      
      fbshipit-source-id: f2d6775ebc490f6f75020d13f37f6b588cc07a0b
      efb72132
    • Jeremy Reizenstein's avatar
      typing for trainer · 40fb189c
      Jeremy Reizenstein authored
      Summary: Enable pyre checking of the trainer code.
      
      Reviewed By: shapovalov
      
      Differential Revision: D36545438
      
      fbshipit-source-id: db1ea8d1ade2da79a2956964eb0c7ba302fa40d1
      40fb189c
    • Jeremy Reizenstein's avatar
      get_all_train_cameras · 4e87c2b7
      Jeremy Reizenstein authored
      Summary: As part of removing Task, make the dataset code generate the source cameras for itself. There's a small optimization available here, in that the JsonIndexDataset could avoid loading images.
      
      Reviewed By: shapovalov
      
      Differential Revision: D37313423
      
      fbshipit-source-id: 3e5e0b2aabbf9cc51f10547a3523e98c72ad8755
      4e87c2b7
    • Jeremy Reizenstein's avatar
      more padding options in Dataloader · 771cf8a3
      Jeremy Reizenstein authored
      Summary: Add facilities for dataloading non-sequential scenes.
      
      Reviewed By: shapovalov
      
      Differential Revision: D37291277
      
      fbshipit-source-id: 0a33e3727b44c4f0cba3a2abe9b12f40d2a20447
      771cf8a3
  3. 04 Jul, 2022 1 commit
    • David Novotny's avatar
      Refactor autodecoders · 0dce8832
      David Novotny authored
      Summary: Refactors autodecoders. Tests pass.
      
      Reviewed By: bottler
      
      Differential Revision: D37592429
      
      fbshipit-source-id: 8f5c9eac254e1fdf0704d5ec5f69eb42f6225113
      0dce8832
  4. 30 Jun, 2022 1 commit
    • Krzysztof Chalupka's avatar
      Refactor ViewMetrics · ae35824f
      Krzysztof Chalupka authored
      Summary:
      Make ViewMetrics easy to replace by putting them into an OmegaConf dataclass.
      
      Also, re-word a few variable names and fix minor TODOs.
      
      Reviewed By: bottler
      
      Differential Revision: D37327157
      
      fbshipit-source-id: 78d8e39bbb3548b952f10abbe05688409fb987cc
      ae35824f
  5. 24 Jun, 2022 1 commit
  6. 20 Jun, 2022 2 commits
    • Jeremy Reizenstein's avatar
      idr harmonic_fns and doc · 81d63c63
      Jeremy Reizenstein authored
      Summary: Document the inputs of idr functions and distinguish n_harmonic_functions to be 0 (simple embedding) versus -1 (no embedding).
      
      Reviewed By: davnov134
      
      Differential Revision: D37209012
      
      fbshipit-source-id: 6e5c3eae54c4e5e8c3f76cad1caf162c6c222d52
      81d63c63
    • Jeremy Reizenstein's avatar
      bg_color for lstm renderer · cba26506
      Jeremy Reizenstein authored
      Summary: Allow specifying a color for non-opaque pixels in LSTMRenderer.
      
      Reviewed By: davnov134
      
      Differential Revision: D37172537
      
      fbshipit-source-id: 6039726678bb7947f7d8cd04035b5023b2d5398c
      cba26506
  7. 16 Jun, 2022 1 commit
    • Jeremy Reizenstein's avatar
      loading llff and blender datasets · 65f667fd
      Jeremy Reizenstein authored
      Summary: Copy code from NeRF for loading LLFF data and blender synthetic data, and create dataset objects for them
      
      Reviewed By: shapovalov
      
      Differential Revision: D35581039
      
      fbshipit-source-id: af7a6f3e9a42499700693381b5b147c991f57e5d
      65f667fd
  8. 10 Jun, 2022 4 commits
    • Jeremy Reizenstein's avatar
      test configs are loadable · 023a2369
      Jeremy Reizenstein authored
      Summary: Add test that the yaml files deserialize.
      
      Reviewed By: davnov134
      
      Differential Revision: D36830673
      
      fbshipit-source-id: b785d8db97b676686036760bfa2dd3fa638bda57
      023a2369
    • Jeremy Reizenstein's avatar
      make ExperimentConfig Configurable · c0f88e04
      Jeremy Reizenstein authored
      Summary: Preparing for pluggables in experiment.py
      
      Reviewed By: davnov134
      
      Differential Revision: D36830674
      
      fbshipit-source-id: eab499d1bc19c690798fbf7da547544df7e88fa5
      c0f88e04
    • Jeremy Reizenstein's avatar
      pluggable JsonIndexDataset · 62752832
      Jeremy Reizenstein authored
      Summary: Make dataset type and args configurable on JsonIndexDatasetMapProvider.
      
      Reviewed By: davnov134
      
      Differential Revision: D36666705
      
      fbshipit-source-id: 4d0a3781d9a956504f51f1c7134c04edf1eb2846
      62752832
    • Jeremy Reizenstein's avatar
      PathManagerFactory · 1d432513
      Jeremy Reizenstein authored
      Summary: Allow access to manifold internally by default.
      
      Reviewed By: davnov134
      
      Differential Revision: D36760481
      
      fbshipit-source-id: 2a16bd40e81ef526085ac1b3f4606b63c1841428
      1d432513
  9. 27 May, 2022 1 commit
    • Roman Shapovalov's avatar
      Adapting configs. · 49ed7b07
      Roman Shapovalov authored
      Summary: As subj.
      
      Reviewed By: bottler
      
      Differential Revision: D36705775
      
      fbshipit-source-id: 7370710e863025dc07a140b41f77a7c752e3159f
      49ed7b07
  10. 26 May, 2022 1 commit
    • Jeremy Reizenstein's avatar
      test runner for experiment.py · c31bf85a
      Jeremy Reizenstein authored
      Summary: Add simple interactive testrunner for experiment.py
      
      Reviewed By: shapovalov
      
      Differential Revision: D35316221
      
      fbshipit-source-id: d424bcba632eef89eefb56e18e536edb58ec6f85
      c31bf85a
  11. 25 May, 2022 1 commit
  12. 20 May, 2022 4 commits
    • Jeremy Reizenstein's avatar
      data_loader_map_provider · 0f12c516
      Jeremy Reizenstein authored
      Summary: replace dataloader_zoo with a pluggable DataLoaderMapProvider.
      
      Reviewed By: shapovalov
      
      Differential Revision: D36475441
      
      fbshipit-source-id: d16abb190d876940434329928f2e3f2794a25416
      0f12c516
    • Jeremy Reizenstein's avatar
      dataset_map_provider · 79c61a2d
      Jeremy Reizenstein authored
      Summary: replace dataset_zoo with a pluggable DatasetMapProvider. The logic is now in annotated_file_dataset_map_provider.
      
      Reviewed By: shapovalov
      
      Differential Revision: D36443965
      
      fbshipit-source-id: 9087649802810055e150b2fbfcc3c197a761f28a
      79c61a2d
    • Jeremy Reizenstein's avatar
      New file for ImplicitronDatasetBase · 69c6d06e
      Jeremy Reizenstein authored
      Summary: Separate ImplicitronDatasetBase and FrameData (to be used by all data sources) from ImplicitronDataset (which is specific).
      
      Reviewed By: shapovalov
      
      Differential Revision: D36413111
      
      fbshipit-source-id: 3725744cde2e08baa11aff4048237ba10c7efbc6
      69c6d06e
    • Jeremy Reizenstein's avatar
      data_source · 73dc109d
      Jeremy Reizenstein authored
      Summary:
      Move dataset_args and dataloader_args from ExperimentConfig into a new member called datasource so that it can contain replaceables.
      
      Also add enum Task for task type.
      
      Reviewed By: shapovalov
      
      Differential Revision: D36201719
      
      fbshipit-source-id: 47d6967bfea3b7b146b6bbd1572e0457c9365871
      73dc109d
  13. 18 May, 2022 1 commit
    • Jeremy Reizenstein's avatar
      Make feature extractor pluggable · 9ec9d057
      Jeremy Reizenstein authored
      Summary: Make ResNetFeatureExtractor be an implementation of FeatureExtractorBase.
      
      Reviewed By: davnov134
      
      Differential Revision: D35433098
      
      fbshipit-source-id: 0664a9166a88e150231cfe2eceba017ae55aed3a
      9ec9d057
  14. 16 May, 2022 1 commit
    • Roman Shapovalov's avatar
      Correcting recent bugs code after debugging on devfair. · 0143d63b
      Roman Shapovalov authored
      Summary:
      1. Typo in the dataset path in the config.
      2. Typo in num_frames.
      3. Pick sequence was cached before it was modified for single-sequence.
      
      Reviewed By: bottler
      
      Differential Revision: D36417329
      
      fbshipit-source-id: 6dcd75583de510412e1ae58f63db04bb4447403e
      0143d63b
  15. 13 May, 2022 1 commit
  16. 12 May, 2022 2 commits
    • David Novotny's avatar
      Raysampler as pluggable · e767c4b5
      David Novotny authored
      Summary:
      This converts raysamplers to ReplaceableBase so that users can hack their own raysampling impls.
      
      Context: Andrea tried to implement TensoRF within implicitron but could not due to the need to implement his own raysampler.
      
      Reviewed By: shapovalov
      
      Differential Revision: D36016318
      
      fbshipit-source-id: ef746f3365282bdfa9c15f7b371090a5aae7f8da
      e767c4b5
    • David Novotny's avatar
      ViewPooler class · 47d06c89
      David Novotny authored
      Summary: Implements a ViewPooler that groups ViewSampler and FeatureAggregator.
      
      Reviewed By: shapovalov
      
      Differential Revision: D35852367
      
      fbshipit-source-id: c1bcaf5a1f826ff94efce53aa5836121ad9c50ec
      47d06c89
  17. 09 May, 2022 1 commit
  18. 06 Apr, 2022 1 commit
  19. 31 Mar, 2022 1 commit
  20. 28 Mar, 2022 1 commit
    • Jeremy Reizenstein's avatar
      setup.py for implicitron_trainer · 0c3bed55
      Jeremy Reizenstein authored
      Summary: Enable `pytorch3d_implicitron_runner` executable
      
      Reviewed By: shapovalov
      
      Differential Revision: D34754902
      
      fbshipit-source-id: 213f3e9183e3f7dd7b4df16ad77d95fbc971d625
      0c3bed55
  21. 25 Mar, 2022 1 commit
    • Roman Shapovalov's avatar
      Return a typed structured config from default_args for callables · 645a47d0
      Roman Shapovalov authored
      Summary:
      Before the fix, running get_default_args(C: Callable) returns an unstructured DictConfig which causes Enums to be handled incorrectly. This is a fix.
      
      WIP update: Currently tests still fail whenever a function signature contains an untyped argument: This needs to be somehow fixed.
      
      Reviewed By: bottler
      
      Differential Revision: D34932124
      
      fbshipit-source-id: ecdc45c738633cfea5caa7480ba4f790ece931e8
      645a47d0
  22. 24 Mar, 2022 1 commit
  23. 21 Mar, 2022 1 commit