Common Tracer Errors

A summary of commonly occurring errors with tracer objects.

“Concretization” type

The error occurs when we use a tracer object in lieu of the concrete. For example, using a tracer object in an if-else condition will throw an error similar to this:

ConcretizationTypeError: Abstract tracer value encountered where concrete value is expected

“Non-concrete” boolean index

The error is similar to the above error. One encounters it while trying to use non-concrete boolean indices. It will throw an error like this:

NonConcreteBooleanIndexError: Array boolean indices must be concrete

Tracer array conversion

We encounter this error while trying to use a tracer with either a non-JAX NumPy or NumPy arrays. It throws something like:

TracerArrayConversionError: The numpy.ndarray conversion method was called on the JAX Tracer object

Get hands-on with 1000+ tech skills courses.