Reduce memory of the parameters class object

Đang mở
#1,080 1 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

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

Từ ngày 22/12/2025.

  • #1083 của @jdebacker — đang mở
  • #1230 của @arihantlodha-cmd — đang mở

Đá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
25/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
performance

Hướng nghiên cứu

The issue concerns the parameters class object that OG-Core builds for a calibration, and the payload names no specific file. Before anything else, read the two linked pull requests, #1083 and #1230, which are still open and already attempt this work. Done would mean a measured reduction in the object's memory footprint, such as narrower dtypes or trimming the T dimension after steady state, with the existing tests still passing. Since the thread has been quiet for about 300 days, confirm with maintainers which approach is wanted before starting.

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

Mô tả

For a typical calibration, the parameters class object is not huge (~20MB), but if one were doing large scale parallelization (or running on a machine with low memory), this could cause issues.

I think we can reduce the footprint of this object without loosing much. A couple of ideas:

  1. Use the more efficient data types (e.g. retirement_age can be cast as an integer, more floating point values would be fine with 32 bit (or even 16 bit).
  2. Most parameters become constant long before the steady state: is there a way to reduce the size of arrays knowing that after some point in the T dimension, things stop changing?
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)
22

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 PSLmodels/OG-Core

Tất cả issue của PSLmodels/OG-Core

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.