fix: make_mask uses deprecated jnp.bool instead of jnp.bool_ - #3371
Conversation
Squashed to single commit for review. Original PR: #7
Greptile SummaryThis PR replaces the deprecated
Confidence Score: 4/5The PR appears safe to merge, with the non-blocking caveat that its new regression test does not actually detect restoration of the deprecated alias. The production test helper now uses the supported boolean dtype alias, while the only accepted concern is ineffective regression coverage because the asserted final mask dtype is boolean in either implementation. Files Needing Attention: tests/jax/test_fused_attn.py Important Files Changed
Reviews (1): Last reviewed commit: "fix: make_mask uses deprecated jnp.bool ..." | Re-trigger Greptile |
| AttnMaskType.PADDING_CAUSAL_BOTTOM_RIGHT_MASK, | ||
| window_size, | ||
| ) | ||
| assert mask.dtype == jnp.bool_ |
There was a problem hiding this comment.
Assertion misses deprecated alias
This assertion checks only the final mask dtype, which is boolean after the logical mask operations whether make_swa_mask receives jnp.bool or jnp.bool_; restoring the deprecated argument therefore leaves this regression test passing.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| segment_pos_kv, | ||
| window_size, | ||
| dtype=jnp.bool, | ||
| dtype=jnp.bool_, |
There was a problem hiding this comment.
We seem to have a few other call sites of jnp.bool? If it's deprecated, could we fix those ones as well? Thanks.
I think we can get away with the test as well.
This PR addresses the following issue in
tests/jax/test_fused_attn.py: make_mask uses deprecated jnp.bool instead of jnp.bool_.Changes
tests/jax/test_fused_attn.py: make_mask uses deprecated jnp.bool instead of jnp.bool_.Details
Tests
tests/jax/test_fused_attn.py