Commit Graph

12 Commits

Author SHA1 Message Date
Angela Yi
45cfe9cdf7 [export] Fix test to run internally (#116118)
Test Plan: `buck2 run @//mode/dev-nosan //caffe2/test:test_export`

Reviewed By: suo

Differential Revision: D52297701

Pull Request resolved: https://github.com/pytorch/pytorch/pull/116118
Approved by: https://github.com/suo
2023-12-20 01:02:16 +00:00
chundian
3643548447 [Export] Support ser/des test on existing cases (#115413)
Summary:
Similar as #115399

Test Plan:
```
$ python test/export/test_serdes.py
...
Ran 72 tests in 29.097s

OK (expected failures=13)
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/115413
Approved by: https://github.com/tugsbayasgalan
ghstack dependencies: #115402
2023-12-13 23:17:12 +00:00
chundian
a34d56a64a [Export] Support retraceability test on existing cases (#115402)
Summary:
Similar as #115399

Test Plan:
python test/export/test_retraceability.py

    Ran 71 tests in 31.929s

    OK (expected failures=14)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/115402
Approved by: https://github.com/tugsbayasgalan
2023-12-13 23:17:12 +00:00
chundian
97888725c5 [Export] Test non-strict mode on existing test cases (#115399)
Summary:
Dynamo test methodology provides a good example to patch various
treaments on the same set of test cases. A pitfall is the global config
that could be easily modified somewhere. Here we change the behavior of
the export API thru hijacking it with self defined code.

For supporting non-strict test suite, the `strict=False` is explicitly
passed into the export API when it's called w/ or w/o strict arg.

Test Plan:
python test/export/test_export_nonstrict.py
Pull Request resolved: https://github.com/pytorch/pytorch/pull/115399
Approved by: https://github.com/zhxchen17, https://github.com/tugsbayasgalan
2023-12-13 16:01:06 +00:00
PyTorch MergeBot
0870afb85c Revert "[Export] Test non-strict mode on existing test cases (#115399)"
This reverts commit 2411a92e9d.

Reverted https://github.com/pytorch/pytorch/pull/115399 on behalf of https://github.com/atalman due to OSSCI oncall, broke CI tests ([comment](https://github.com/pytorch/pytorch/pull/115399#issuecomment-1853869965))
2023-12-13 12:59:09 +00:00
PyTorch MergeBot
bda6f02343 Revert "[Export] Support retraceability test on existing cases (#115402)"
This reverts commit b0c7dd47cd.

Reverted https://github.com/pytorch/pytorch/pull/115402 on behalf of https://github.com/atalman due to OSSCI oncall, broke CI tests ([comment](https://github.com/pytorch/pytorch/pull/115402#issuecomment-1853864075))
2023-12-13 12:55:07 +00:00
PyTorch MergeBot
3b87681ddc Revert "[Export] Support ser/des test on existing cases (#115413)"
This reverts commit 4744359163.

Reverted https://github.com/pytorch/pytorch/pull/115413 on behalf of https://github.com/atalman due to OSSCI oncall, broke CI tests ([comment](https://github.com/pytorch/pytorch/pull/115413#issuecomment-1853859443))
2023-12-13 12:51:34 +00:00
chundian
4744359163 [Export] Support ser/des test on existing cases (#115413)
Summary:
Similar as #115399

Test Plan:
```
$ python test/export/test_serdes.py
...
Ran 72 tests in 29.097s

OK (expected failures=13)
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/115413
Approved by: https://github.com/tugsbayasgalan
ghstack dependencies: #115399, #115402
2023-12-13 06:01:17 +00:00
chundian
b0c7dd47cd [Export] Support retraceability test on existing cases (#115402)
Summary:
Similar as #115399

Test Plan:
python test/export/test_retraceability.py

FAILED (failures=6, errors=8, expected failures=7)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/115402
Approved by: https://github.com/tugsbayasgalan
ghstack dependencies: #115399
2023-12-13 06:01:17 +00:00
chundian
2411a92e9d [Export] Test non-strict mode on existing test cases (#115399)
Summary:
Dynamo test methodology provides a good example to patch various
treaments on the same set of test cases. A pitfall is the global config
that could be easily modified somewhere. Here we change the behavior of
the export API thru hijacking it with self defined code.

For supporting non-strict test suite, the `strict=False` is explicitly
passed into the export API when it's called w/ or w/o strict arg.

Test Plan:
python test/export/test_export_nonstrict.py
Pull Request resolved: https://github.com/pytorch/pytorch/pull/115399
Approved by: https://github.com/zhxchen17, https://github.com/tugsbayasgalan
2023-12-13 06:01:17 +00:00
PyTorch MergeBot
d6f8850653 Revert "[Export] Test non-strict mode on existing test cases (#115399)"
This reverts commit 36527df344.

Reverted https://github.com/pytorch/pytorch/pull/115399 on behalf of https://github.com/atalman due to OSSCI oncall, broke CI tests ([comment](https://github.com/pytorch/pytorch/pull/115399#issuecomment-1851988651))
2023-12-12 13:02:18 +00:00
chundian
36527df344 [Export] Test non-strict mode on existing test cases (#115399)
Summary:
Dynamo test methodology provides a good example to patch various
treaments on the same set of test cases. A pitfall is the global config
that could be easily modified somewhere. Here we change the behavior of
the export API thru hijacking it with self defined code.

For supporting non-strict test suite, the `strict=False` is explicitly
passed into the export API when it's called w/ or w/o strict arg.

* For existing failed strict test cases, non-strict also fails.
* For passed strict but failed non-strict cases, we mark them as
`@testing.expectedFailureNonStrict`.
* Moreover, I manually check the failure reason and some of them are not
related to nn.Module asserting exception. I mark them as `# Need to fix
for non-strict mode`.

Test Plan:
python test/export/test_export_nonstrict.py
Pull Request resolved: https://github.com/pytorch/pytorch/pull/115399
Approved by: https://github.com/zhxchen17, https://github.com/tugsbayasgalan
2023-12-12 07:11:53 +00:00