[ONNX] Handling incorrect format for example_outputs (#55802) (#57829)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57829
Handling incorrect format for example_outputs, fixing exception behavior.
Test Plan: Imported from OSS
Reviewed By: malfet
Differential Revision: D28393521
Pulled By: SplitInfinity
fbshipit-source-id: aa518483f94e31194b951198aefa7c897932356e
Co-authored-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Co-authored-by: Negin Raoof <neginmr@utexas.edu>