Make validate private by renaming validate to _validate (#107927)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/107927
Approved by: https://github.com/tugsbayasgalan
This commit is contained in:
gmagogsfm 2023-08-25 08:14:52 +00:00 committed by PyTorch MergeBot
parent f2f82855e2
commit 39854df1d3
3 changed files with 2 additions and 8 deletions

View File

@ -17,7 +17,6 @@ torch.export
.. autoclass:: ExportedProgram
.. automethod:: transform
.. automethod:: validate
.. automethod:: module
.. autoclass:: ExportBackwardSignature

View File

@ -143,7 +143,7 @@ class TestExport(TestCase):
{},
preserve_module_call_signature=("foo.nested", "foo"),
)
ep.validate()
ep._validate()
self.assertEqual(len(ep.module_call_graph), 2)
# TODO(zhxchen17) unflattener
# unflattened = unflatten(export_module)

View File

@ -558,12 +558,7 @@ class ExportedProgram:
_assertion_graph = _assertion_graph_res.graph_module
_assertion_graph(*args)
def validate(self):
"""
.. warning::
Do not use.
"""
def _validate(self):
# TODO(zhxchen17) check for get_attr
# TODO(zhxchen17) check for funcitonal ops
for gm in self.graph_module.modules():