CSC/ CSR classes
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- numpy, python
- Lĩnh vực
- data, performance
Hướng nghiên cứu
Issue không nêu tên các tệp triển khai hoặc các bài kiểm thử. Trước tiên, hãy xem xét hệ phân cấp kiểu mảng thưa hiện có và các đối tượng tương ứng CSR và CSC của scipy.sparse, sau đó xác định các yêu cầu về API công khai, tính kế thừa và hiệu năng trước khi triển khai bất kỳ thứ gì. Công việc được xem là hoàn tất khi có các lớp CSR và CSC tường minh với hành vi tương tự ndarray và hiệu năng tương đương với các đối tượng tương ứng của scipy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
Could explicit CSR and CSC classes be added to this library?
I would love to stop using scipy.sparse.spmatrix classes. Their matrix API is a source of constant frustration. Lack of CSC and CSR arrays with an np.ndarray API has been a barrier to adoption not only of this library, but of xarray and dask for the scanpy/ anndata projects
Describe the solution you'd like
I would like there to be explicit CSR and CSC classes in this package. These should perform at least as well as scipy.sparse.spmatrix counterparts.
While higher dimensional algorithms are developed, performant implementations for these cases can be taken from scipy.sparse or developed from reference implementations. I think this is a low effort/ high pay-off path towards performant implementations for common formats. They wouldn't be n-dimensional, but there's a lot of value in being able to start consolidating efforts to this library before an n-dimensional generalization has the features and performance of the common 2d cases.
Describe alternatives you've considered
No explicit CSC/ CSR classes. These are subsets of more generic structures so why special case them?
I think this is the wrong approach due to how common these structures are. Even a flexible framework like taco exports these formats (pytaco.csc and pytaco.csr).
We could also consider what code looks like if these classes are not defined. All dispatch here could change from isinstance(x, sparse.csr_matrix) to something like isinstance(x, sparse.GXCS) and x.compressed_axes == (0,) and x.ndims == 2), but something closer to the first case is probably an easier sell.
CSC/ CSR classes as thin wrappers of an n-dimensional format
I think this is a great goal. However, it requires an implementation of that format which is at least as performant in most (probably all) cases as the scipy equivalents for broad adoption. As mentioned above, performant implementations can be (1) sourced from a current dependency (scipy.sparse) or (2) easily adapted from existing reference implementations.
Code specialized for these cases could gradually be replaced with more generic versions as they are implemented. However, performant implementation for these common cases would not be blocked by implementation of n-dimensional algorithms.
Additional context
I could expand on why I think this is the right way to go
I could go on about how important I think it is for there to be CSR and CSC classes in this library, and why it's important to implement these separately from higher dimensional generalizations. I find that makes this post too long. I'd be happy to add these arguments if asked.
Type hierarchy
I don't know what the appropriate type hierarchy is here. Should issubclass(CSR, GXCS) work? Or should there be an abstract CompressedDimSparseArray parent class for all of these? What is the result type of np.stack(: list[CSR]).
These are things that could be decided on later, once the n-dimensional compressed representation is public API.
- Ngôn ngữ chính
- Python
- Star
- 670
- Fork
- 167
- Merge trung bình
- 3 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọ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 pydata/sparse
-
Bug: full einsum contractions upcast the dtype and count booleansCó thể đã có người làm @RaphaelFakhri đã nhận 17 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: ufunc outer rejects Python scalar and sequence operandsCó thể đã có người làm @nawaaaaaAaar đã nhận 29 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Bug: slices with a negative step and a negative stop return wrong elementsCó thể đã có người làm @JoeyTan21 đã nhận 19 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
pydata/sparse#1019 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: matmul fails with zero-length broadcast batch dimensionsCó thể đã có người làm @nawaaaaaAaar đã nhận 29 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 40/100
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: zero-length tensor contractions ignore requested output typesCó thể đã có người làm @nawaaaaaAaar đã nhận 29 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của pydata/sparse
Issue tương tự
-
needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
flashinfer-ai/flashinfer#9803 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
oscarbol09/thesisforge#61 ·
-
api bug performance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
oscarbol09/audiobard#159 ·
-
area:web p2 product:business triage:active type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 89/100
cuadrao-ai/argus#2328 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
nikhilb2/simple_invoicing#907 ·