Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable package import from torchbenchmark and torchbenchmark.models. (#…
…2200) Summary: More intuitive module import when installed as a package. This PR adds LazyImport to all torchbenchmark models so that they will be loaded only when being used. Pull Request resolved: #2200 Test Plan: Run the following commands: ``` python install.py pip install -e . $ python -c "import torchbenchmark.models; print(torchbenchmark.models.densenet121.Model)" <class 'torchbenchmark.models.densenet121.Model'> $ python -c "import torchbenchmark; print(torchbenchmark.models.densenet121.Model)" <class 'torchbenchmark.models.densenet121.Model'> ``` Fixes #2193 Reviewed By: drisspg Differential Revision: D55024068 Pulled By: xuzhao9 fbshipit-source-id: c9572308d202afaf8e528adb6585b5db80936cbd
- Loading branch information