Two small JAX-related cleanups
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 52/100
Hướng nghiên cứu
Read src/array_api_extra/_lib/_helpers.py around the JAX capabilities() workaround and src/array_api_extra/_agnostic/_set.py around nunique. The issue leaves removal of the workaround contingent on deciding whether to support JAX versions below 0.6.0, so first check project policy and tests. Done means the comments accurately describe JAX's unique_counts behavior, and any shim or minimum-version documentation reflects the project's support decision.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
1. Drop the capabilities() shim for jax < 0.6.0?
_helpers.capabilities forces "boolean indexing" to False for JAX. This works around jax-ml/jax#27418, which was fixed in JAX 0.6.0 (March 2025). CI pins jax >= 0.10.2, so this branch never runs there (it is marked # pragma: no cover).
The package doesn't declare a minimum JAX version, so whether to remove it is a policy question: do we still want to support JAX < 0.6.0 at runtime? If not, the branch can be deleted:
out = xp.__array_namespace_info__().capabilities()
if _compat.is_torch_namespace(xp):
...
Removing it would also be a good moment to document a minimum supported JAX version.
2. Inaccurate comment in nunique
# 3. backend does not have unique_counts; e.g. wrapped JAX
JAX does have unique_counts. It takes the O(n log n) sort-based path because capabilities()["data-dependent shapes"] is False (the output shape of unique_counts can't be known under jax.jit). Also, JAX is no longer "wrapped": jax.numpy is used directly. Suggested wording:
# 3. backend lacks data-dependent shapes, so unique_counts is unusable
# (e.g. JAX, whose output shape can't be known under jax.jit)
The comment just below it, # xp does not have unique_counts; O(n*logn) complexity, should be updated the same way.
- Ngôn ngữ chính
- Python
- Star
- 33
- Fork
- 33
- Merge trung bình
- 1 giờ 16 phút
- Pull request đã merge (30 ngày)
- 32
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của data-apis/array-api-extra
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
data-apis/array-api-extra#1005 · 15 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ENH: new function `replace`Đang mởenhancement new function
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
data-apis/array-api-extra#992 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
data-apis/array-api-extra#1014 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ENH, TST: Add support for MLX as array backendCó thể đã có người làm @prady0t đã nhận 9 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
data-apis/array-api-extra#1006 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
data-apis/array-api-extra#1002 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của data-apis/array-api-extra
Issue tương tự
-
fix(accounts): Balance Sheet and Profit and Loss crash on PostgreSQL due to MySQL force_indexĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Discord webhook notifications fail with HTTP 403 (Cloudflare blocks default urllib User-Agent)Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
tharje/spooler-v2#20 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bump version of azure-servicebusCó thể đã có người làm @joostlek đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
home-assistant/core#186275 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100