Reduce memory of the parameters class object

Abierto
#1,080 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@jdebacker ya está trabajando en esto.

Desde el 22/12/2025.

  • #1083 de @jdebacker — abierto
  • #1230 de @arihantlodha-cmd — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
performance

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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?
Lenguaje dominante
Python
Estrellas
85
Forks
153
Merge medio
1 d 19 h
PR fusionados (30 d)
19

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PSLmodels/OG-Core

Todos los issues de PSLmodels/OG-Core

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.