Scipy root finders give different answers across operating systems and Python versions
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ó
- 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
- 12/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- numpy, python
- Lĩnh vực
- backend, testing-qa
Hướng nghiên cứu
The failures show up in the tests under tests/, which compare root-finder output with np.allclose() across platforms. The issue proposes options (float64 inputs, better problem scaling and tolerances) but does not choose one, so there is no clear change to make. Start by reproducing one failing test locally and in CI, then ask maintainers which approach to take before writing any patch.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The root finders in scipy.optimize give different answers across operating systems and Python versions as has been seen in our unit tests in the ./tests/ directory. We have had tests that pass in the GitHub actions but do not pass locally and vice versa. And the reasons are failing the np.allclose() criteria in comparing objects.
We need to get the solvers in OG-Core to give the same answers to an adequate degree of precision across platforms. Here are some helpful references and proposed potential solutions.
- Consistent numerical precision across platforms. This articles discusses the relative numerical precision performance of Intel and Apple M1 chips in some famously difficult problems. The Intel and Apple M1 chips give the same wrong answers. The Numpy documentation for "Array types and conversions between types" lists the different numerical types available in Numpy and says the following. We could try setting all our inputs to numerical routines to
np.float64(double precision). There are higher levels of precision, but I don't think we need them.
Since many of these [numerical data types] have platform-dependent definitions, a set of fixed-size aliases are provided (see Sized aliases).
-
Correctly scaled problem and different tolerance levels across solvers. This Stack Overflow question and answer discuss the importance of having a well-posed optimization problem that is correctly scaled. It also discusses the merits of setting the tolerance of the problem to be sufficiently precise.
-
Try other solvers that might be more consistent. I can't find any non-SciPy root finders. I thought that
cvxoptmight be one, but it is really a minimizer.
cc: @jdebacker
- Ngôn ngữ chính
- Python
- Star
- 85
- Fork
- 153
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 19
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
- Đọ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 PSLmodels/OG-Core
-
bug
Độ 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 1 ngày
-
Potential issues with NDC system modelingCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
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
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
PSLmodels/OG-Core#1218 · 1 bình luận ·
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
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PSLmodels/OG-Core
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
didi/helixharness#18 ·
-
[MOVIE]: Airport '77 (1977)Đang mởrequest-theme
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
LizardByte/ThemerrDB#9883 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
NousResearch/hermes-agent#149885 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Set cache_ok = True on GUID TypeDecorator to enable SQLAlchemy query cachingCó thể đã có người làm @patelshivani2283-lab đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
fedora-infra/anitya#2157 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Project-MONAI/MONAI#9258 ·
Maintainer thường phản hồi trong vòng 3 ngày