Can RuntimeGeneratedFunctions.jl cause memory leak issue?
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- julia
- Área
- performance
Línea de trabajo
Comienza con los puntos de entrada eval_solution y eval_genfunc y, después, reproduce el bucle principal con hilos que llama repetidamente a @RuntimeGeneratedFunction. Perfila la memoria alrededor de la creación de funciones generadas y de la simulación en g, incluyendo si se acumulan objetos Expr o de función retenidos. Se considera terminado cuando un caso mínimo reproducible identifica el componente que provoca la fuga o muestra que no se puede confirmar ningún problema del paquete.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi,
I am writing a Genetic Programming-styled code to search for solutions to specific problems. The solutions are in the form of functions. Thus, I use RuntimeGeneratedFunctions.jl to generate functions in runtime in order to evaluate their fitnesses. As the code runs (on WSL) and time goes by, the amount of available RAM on my computer becomes less and less until the system forcibly closes the terminal. I suspect it is due to the generated functions. I wonder if it is a known problem and if there exists a solution. Thank you.
Here is the part of the code that involves RuntimeGeneratedFunctions.jl:
function eval_solution(expr, data, eval_genfunc)
f = expr
f1 = @RuntimeGeneratedFunction(f)
fitness = evaluate_genfunc(f1, data)
return fitness
end
Here, expr is the Expr containing the content of the function to be generated, data is the data necessary to calculate the fitness of the generated function, eval_genfunc is a custom function to calculate the fitness of a generated function. eval_genfunc looks like this:
function eval_genfunc(f1, data)
parameters = f1(data)
score = g(parameters) % g performs a simulation with given parameters and extracts some information from there as the score
return score
end
The function eval_solution( ) is used in multithreading mode in a main function:
function main(...)
...
while iterate > 0
Threads.@threads for i in n_threads
expr = ... % Calling the function to generate an expr
fitness = eval_solution(expr, data, eval_genfunc)
...
end
...
iterate -= 1
end
...
end
- Lenguaje dominante
- Julia
- Estrellas
- 114
- Forks
- 19
- Merge medio
- 2 h 42 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de SciML/RuntimeGeneratedFunctions.jl
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
RGFs built after a module is re-evaluated at the same path get the old module's id and run its codeAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Can crash julia on 1.13?Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
SciML/RuntimeGeneratedFunctions.jl#114 · 1 comentario ·
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
SciML/RuntimeGeneratedFunctions.jl#100 · 1 comentario ·
-
GPU supportAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
SciML/RuntimeGeneratedFunctions.jl#93 · 4 comentarios ·
Todos los issues de SciML/RuntimeGeneratedFunctions.jl
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
MagneticResonanceImaging/MRIReco.jl#366 ·
Los mantenedores suelen responder en 3 días
-
`AdamW` gives `NaN` for zero-gradient entries of `Float16` parameters (epsilon underflows to 0)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
FluxML/Optimisers.jl#253 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
JuliaGraphs/GraphNeuralNetworks.jl#736 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día