Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Semantic mismatch in `SpecCluster.requested`

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 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

Bắt đầu với SpecCluster.requested và theo dõi cách AdaptiveCore sử dụng thuộc tính đó, sau đó kiểm tra scheduler_info workers và các đặc tả worker được nhóm. Xác minh hành vi hiện tại đối với worker được nhóm và không được nhóm theo hai ý nghĩa được mô tả trong issue; công việc được xem là hoàn tất khi requested khớp với các worker mà scheduler biết, thay vì chỉ mở rộng đặc tả.

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

Mô tả

needs info

related to #9102

SpecCluster.requested doesn't match what AdaptiveCore expects:

  • AdaptiveCore expects: "workers we've asked for but haven't arrived yet"
  • SpecCluster provides: "all workers in our spec, expanded by groups"

This mismatch exists because SpecCluster uses self.workers as a proxy for "requested". For non-grouped workers these are 1:1. For grouped workers, a single worker in self.workers is a group of multiple worker processes.

potential fix

We could make SpecCluster.requested more accurately represent "workers we've asked for that the scheduler knows about"

@property
def requested(self):
    out = set()
    scheduler_workers = {d["name"] for d in self.scheduler_info.get("workers", {}).values()}
    
    for name in self.workers:
        try:
            spec = self.worker_spec[name]
        except KeyError:
            continue
            
        if "group" in spec:
            # Only count workers that actually exist
            out.update({
                str(name) + suffix 
                for suffix in spec["group"]
                if str(name) + suffix in scheduler_workers
            })
        else:
            if name in scheduler_workers:
                out.add(name)
    return out
Ngôn ngữ chính
Python
Star
1.7k
Fork
778
Merge trung bình
1 giờ 36 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

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 dask/distributed

Tất cả issue của dask/distributed

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.