Can RuntimeGeneratedFunctions.jl cause memory leak issue?
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- julia
- 領域
- performance
調査の方向性
まず eval_solution と eval_genfunc のエントリポイントから始め、次に @RuntimeGeneratedFunction を繰り返し呼び出すスレッド化されたメインループを再現します。生成関数の作成と g 内のシミュレーションの周辺でメモリをプロファイルし、保持された Expr または関数オブジェクトが蓄積するかどうかも確認します。最小再現可能ケースによってリークしているコンポーネントを特定できるか、パッケージの問題を確認できないことを示せれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Julia
- スター
- 114
- フォーク
- 19
- 平均マージ
- 2時間 42分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SciML/RuntimeGeneratedFunctions.jl のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
RGFs built after a module is re-evaluated at the same path get the old module's id and run its codeオープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
SciML/RuntimeGeneratedFunctions.jl#114 · コメント 1 件 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
SciML/RuntimeGeneratedFunctions.jl#100 · コメント 1 件 ·
-
GPU supportオープン
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
SciML/RuntimeGeneratedFunctions.jl#93 · コメント 4 件 ·
SciML/RuntimeGeneratedFunctions.jl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
MagneticResonanceImaging/MRIReco.jl#366 ·
メンテナーはふだん 3 日以内に返信
-
`AdamW` gives `NaN` for zero-gradient entries of `Float16` parameters (epsilon underflows to 0)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
FluxML/Optimisers.jl#253 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
JuliaGraphs/GraphNeuralNetworks.jl#736 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信