optimistix icon indicating copy to clipboard operation
optimistix copied to clipboard

`UnexpectedTracerError` when enabling `EQX_ON_ERROR=breakpoint`

Open Randl opened this issue 1 year ago • 1 comments

While working on https://github.com/patrick-kidger/optimistix/pull/71 I got an XlaRuntimeError in which the error message suggested to turn EQX_ON_ERROR=breakpoint. However, when I do that, many tests, even ones that didn't fail before, start failing with UnexpectedTracerError.

Steps to reproduce

  1. Set envvar EQX_ON_ERROR=breakpoint
  2. Run test_minimise tests.

Randl avatar Aug 10 '24 07:08 Randl

I suspect you also need to set EQX_ON_ERROR_BREAKPOINT_FRAMES; see also the docs at https://docs.kidger.site/equinox/api/errors/#equinox.error_if. This is all to work around a known JAX bug, which is likely what you're bumping into.

This is something I've already improevd for the next release. EQX_ON_ERROR_BREAKPOINT_FRAMES will be set to 1 by default (so that this error doesn't trigger at all, even if you can't navigate the stack), and I've added a lot of extra printout when you open the debugger, better instructing you what to do.

patrick-kidger avatar Aug 10 '24 16:08 patrick-kidger