Skip to content

Commit

Permalink
Make validate private by renaming validate to _validate (pytorch#107927)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmagogsfm authored and pytorchmergebot committed Aug 25, 2023
1 parent f2f8285 commit 39854df
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion docs/source/export.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ torch.export
.. autoclass:: ExportedProgram

.. automethod:: transform
.. automethod:: validate
.. automethod:: module

.. autoclass:: ExportBackwardSignature
Expand Down
2 changes: 1 addition & 1 deletion test/export/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def forward(self, x, y):
{},
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)
Expand Down
7 changes: 1 addition & 6 deletions torch/export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,7 @@ def _check_input_constraints(self, *args):
_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():
Expand Down

0 comments on commit 39854df

Please sign in to comment.