Loop Error : Abstract tracer value encountered where concrete value is expected (in `bool`)

Hi everyone,

I had an error while running the training loop cell, as follows:

jax.core.ConcretizationTypeError: Abstract tracer value encountered where concrete value is expected (in bool). Use transformation parameters such as static_argnums for jit to avoid tracing input values.

See https://jax.readthedocs.io/en/latest/faq.html#abstract-tracer-value-encountered-where-concrete-value-is-expected-error. Encountered value: Traced<ShapedArray(bool):JaxprTrace(level=0/0)>

I cannot find the ‘jit’ in order to insert the parameter…
Can anyone help?

Hi @Emilie_Viard,

Can you share your lab ID with me ? In the assignment, when you click the top right “Help” button, a panel will open and your lab ID will be shown at the bottom.

I shall take a look.

When you reply back, kindly tag me in the post so that I’m notified.

Thanks,
Mubsi

Hi, I am having the same issue. My Lab ID is iiipujei. When I run the following code I get the error below:

Cell/Code:

training_loop = training.Loop(NMTAttn(mode=‘train’),
train_task,
eval_tasks=[eval_task],
output_dir=output_dir)

Error message:

jax._src.errors.TracerArrayConversionError: The numpy.ndarray conversion method array() was called on the JAX Tracer object Traced<ShapedArray(bool[32])>with<DynamicJaxprTrace(level=1/0)> (JAX Errors — JAX documentation)

Would love any help you could offer. All other tests pass and I’ve updated my workbook to the latest version.

Hi @Cameron_Carver,

My apologise for replying this late. I was on a vacation. But I’m back now. Is this something you still need help with ? Let me know.

Thanks,
Mubsi