Forward stderr and stdout through pybindings (#1537)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/1537 ExecuTorch handles errors by logging information directly to stderr and then returning error codes. In the pybindings we then check the error code and throw an exception. The problem with this is that the information written directly to stderr was lost and not seen in the python environments. This diff overwrites the pal to send logs through a stream (cerr) and then redirects that stream to the python environments with scoped_estream_redirect Reviewed By: larryliu0820, kirklandsign Differential Revision: D52546579 fbshipit-source-id: 283fb0023b9407c197b3231e83b7da5017215d49
J
Jacob Szwejbka committed
797481f1a7b9c5cb09cce38a9f61dea435e60022
Parent: 6cdc9b6
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 1/5/2024, 8:03:01 PM