jax-ml/jax

improve pjit pytree error involving Nones (and PytreeLeafs)

Aperta

#13.074 aperta il 2 nov 2022

 (6 commenti) (3 reazioni) (1 assegnatario)Python (3738 fork)github user discovery
better_errorsgood first issue

Metriche repository

Star
 (36.180 stelle)
Metriche merge PR
 (Merge medio 2g 19h) (439 PR mergiate in 30 g)

Descrizione

When pjit's in_axis_resoures is not a pytree prefix of the corresponding arguments' pytrees, we attempt to raise a good error. But at least two things can be improved:

  • don't mention PytreeLeaf instances in the error message
  • handle None specially (since it's surprising for the error message to refer to it as a container)

Guida contributor