mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 21:49:24 +08:00
[export] Publicize validate function (#132777)
as titled Pull Request resolved: https://github.com/pytorch/pytorch/pull/132777 Approved by: https://github.com/zhxchen17
This commit is contained in:
committed by
PyTorch MergeBot
parent
21d4c48059
commit
c327710a87
@ -716,7 +716,7 @@ class ExportedProgram:
|
||||
assert all(issubclass(v, Verifier) for v in verifiers)
|
||||
self._verifiers = verifiers
|
||||
# Validate should be always the last step of the constructor.
|
||||
self._validate()
|
||||
self.validate()
|
||||
|
||||
@property
|
||||
@compatibility(is_backward_compatible=False)
|
||||
@ -1131,6 +1131,11 @@ class ExportedProgram:
|
||||
input_placeholders, flat_args_with_path, self.range_constraints
|
||||
)
|
||||
|
||||
@compatibility(is_backward_compatible=False)
|
||||
def validate(self):
|
||||
self._validate()
|
||||
|
||||
# TODO: remove this
|
||||
@final
|
||||
def _validate(self):
|
||||
assert (
|
||||
|
Reference in New Issue
Block a user