Reductions do not properly support unstructured distributions

Đang mở
#659 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
distributed-systems

Hướng nghiên cứu

Chạy bản tái hiện IPython.parallel được cung cấp với dacluster start -n4, sau đó lần theo distarray/globalapi/distarray.py qua _reducedistarray/globalapi/maps.py qua Distribution.reduce, get_dim_data_per_rankUnstructuredMap.get_dimdicts. Hoàn thành khi darr.sum(axis=1) thực thi thành công và các chỉ mục đầu vào không cấu trúc được truyền sang phân phối đầu ra.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

This reproduces the problem

# Using IPython.parallel: 'dacluster start -n4' before running.
import numpy as np
from distarray.globalapi import Context
from distarray.globalapi.maps import Distribution, NoDistMap, UnstructuredMap

nparr = np.random.rand(4, 5)

context = Context()
m0 = UnstructuredMap(4, 3, [[0], [1], [2, 3]])
m1 = NoDistMap(5, 1)
distribution = Distribution.from_maps(
    context,
    maps=[m0, m1],
    targets=[0, 1, 3]
)

darr = context.fromarray(nparr, distribution)
from IPython.core.debugger import Tracer; Tracer()()
darr.sum(axis=1)  # boom!

This results in

Traceback (most recent call last):
  File "failure.py", line 19, in <module>
    darr.sum(axis=1)  # boom!
  File "/Users/cfarrow/projects/distarray/distarray/globalapi/distarray.py", line 383, in sum
    return self._reduce('sum_reducer', axis, dtype, out)
  File "/Users/cfarrow/projects/distarray/distarray/globalapi/distarray.py", line 362, in _reduce
    ddpr = out_dist.get_dim_data_per_rank()
  File "/Users/cfarrow/projects/distarray/distarray/globalapi/maps.py", line 830, in get_dim_data_per_rank
    dds = [enumerate(m.get_dimdicts()) for m in self.maps]
  File "/Users/cfarrow/projects/distarray/distarray/globalapi/maps.py", line 510, in get_dimdicts
    raise ValueError()
ValueError

Distribution.reduce does not appear to consider UnstructuredMap, which leads to the indices used by the input UnstructuredMap to not be propagated to the output UnstructuredMap.

Ngôn ngữ chính
Python
Star
5
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của enthought/distarray

Tất cả issue của enthought/distarray

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.