Learning-to-Rank using JAX. Current version 0.4.0. Development is active but slow; no recent releases in 2024.
pip install raxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compute pointwise MSE loss and NDCG metric
Use `grad_loss = jax.grad(lambda s: loss(scores=s, labels=labels))`
Change `from rax.losses import PointwiseLoss` to `from rax import PointwiseLoss`
Pass labels as integers (e.g., 0,1,2) instead of one-hot vectors.
Ensure arrays are of shape (batch_size, list_size) using `jnp.expand_dims` or batching.