jax-ml/jax

improve pjit pytree error involving Nones (and PytreeLeafs)

开放

#13,074 创建于 2022年11月2日

 (6 条评论) (3 个反应) (1 位负责人)Python (3,743 个派生)github user discovery
better_errorsgood first issue

仓库指标

星标
 (36,206 个星标)
PR 合并指标
 (平均合并 2天 19小时) (30 天内合并 439 个 PR)

描述

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)

贡献者指南