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

limits= dict and list form don't allow full customizaton

Đang mở
#277 4 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

@itamarst đang làm issue này rồi.

Từ ngày 23/10/2026.

  • #278 của @itamarst — đang mở

Đá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
58/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
api, backend

Hướng nghiên cứu

Start by reading the limits= handling in threadpool_limit() and the code that matches limits to detected libraries; the issue points to the comment describing prefix and user_api keys. Check how library filepaths are represented and used, then add coverage for two libraries with the same prefix. Done means a list or dict limit can target one library by its unique filepath.

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

Mô tả

Starting point: we want custom limit for OpenBLAS with pthreads.

So we want to say one specific controller should have a different limit. In theory the relevant APIs (threadpool_limit() etc) support this by passing a list or a dict to the limits= parameter.

In practice, if you pass in a list or a dict it uses the prefix as the unique key, and prefix is not a unique key, different libraries can have the same prefix. So there is no way to specify just one library should have a different limit:

            # self._limits is a dict {key: num_threads} where key is either
            # a prefix or a user_api. If a library matches both, the limit
            # corresponding to the prefix is chosen.

While real-world packaging choices of OpenBLAS may result in this not being a problem, that means it'd only work by accident.

The logic should really be using filepath as the first key to check, not prefix, since filepath is the only one guaranteed to be unique.

Ngôn ngữ chính
Python
Star
434
Fork
38
Merge trung bình
3 ngày 7 giờ
Pull request đã merge (30 ngày)
6

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 joblib/threadpoolctl

Tất cả issue của joblib/threadpoolctl

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.