mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72367
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72299
Test Plan:
Before https://github.com/pytorch/pytorch/pull/71520:
```
Summary
Pass: 106
Fail: 1
✗ caffe2/test:package - test_repackage_import_indirectly_via_parent_module (package.package_d.test_repackage.TestRepackage)
Skip: 22
...
ListingSuccess: 1
```
After https://github.com/pytorch/pytorch/pull/71520:
```
BUILD SUCCEEDED
✓ ListingSuccess: caffe2/test:package : 129 tests discovered (28.595)
✓ Pass: caffe2/test:package - test_repackage_import_indirectly_via_parent_module (package.package_d.test_repackage.TestRepackage) (18.635)
Summary
Pass: 1
ListingSuccess: 1
```
Reviewed By: PaliC
Differential Revision: D34015540
fbshipit-source-id: b45af5872ae4a5f52afbc0008494569d1080fa38
(cherry picked from commit 432d728e66)
12 lines
219 B
Python
12 lines
219 B
Python
import torch
|
|
|
|
from .subpackage_0.subsubpackage_0 import important_string
|
|
|
|
|
|
class ImportsDirectlyFromSubSubPackage(torch.nn.Module):
|
|
|
|
key = important_string
|
|
|
|
def forward(self, inp):
|
|
return torch.sum(inp)
|