You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments