Can RuntimeGeneratedFunctions.jl cause memory leak issue?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- julia
- Ambito
- performance
Direzione di ricerca
Inizia dagli entry point eval_solution e eval_genfunc, quindi riproduci il ciclo principale con thread che chiama ripetutamente @RuntimeGeneratedFunction. Esegui il profiling della memoria intorno alla creazione delle funzioni generate e alla simulazione in g, verificando anche se si accumulano oggetti Expr o oggetti funzione mantenuti. Il lavoro è completato quando un caso minimo riproducibile identifica il componente che causa la perdita oppure mostra che non è possibile confermare alcun problema del package.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Julia
- Stelle
- 114
- Fork
- 19
- Merge medio
- 2h 42m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SciML/RuntimeGeneratedFunctions.jl
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
RGFs built after a module is re-evaluated at the same path get the old module's id and run its codeAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Can crash julia on 1.13?Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
SciML/RuntimeGeneratedFunctions.jl#114 · 1 commento ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
SciML/RuntimeGeneratedFunctions.jl#100 · 1 commento ·
-
GPU supportAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
SciML/RuntimeGeneratedFunctions.jl#93 · 4 commenti ·
Tutte le issue di SciML/RuntimeGeneratedFunctions.jl
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
MagneticResonanceImaging/MRIReco.jl#366 ·
I maintainer di solito rispondono entro 3 giorni
-
`AdamW` gives `NaN` for zero-gradient entries of `Float16` parameters (epsilon underflows to 0)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
FluxML/Optimisers.jl#253 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
JuliaGraphs/GraphNeuralNetworks.jl#736 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno