[FEATURE] Replace the stdin/stdout JSON hand-off between Python and Julia OPF with file-based exchange
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
Start with pm_optimize and Main.jl, where the issue says Python writes input to Julia’s stdin and Julia emits results on stdout; trace how arguments and the existing results directory are handled. Check the subprocess and result conversion paths, then run the relevant optimization tests. Done means input and result are exchanged through files and stdout carries logs only, with results still loaded into the eDisGo object.
索引モデルが issue の本文から書いたものです。
説明
Current state
pm_optimize writes the network as one JSON line to the Julia subprocess's stdin; Main.jl
prints the result JSON to stdout, interleaved with debug logs, printlns and Gurobi
banners. Python identifies the result line by out.rstrip().startswith('{"name"').
Why this is fragile
- Result detection depends on unguaranteed JSON key order.
JSON.json(::Dict)serializes
in hash/iteration order —"name"being the first key is coincidence, not contract. If the
result line ever starts with another key (different Julia/JSON.jl version, changed key set),
thestartswithbranch misses it:from_powermodelsis never called, no results are
written to the eDisGo object, the raw JSON is echoed to stdout, and the run still logs
"Julia process was successful." — silent loss of results on a successful solve. - Logs and payload share one channel, separated only by prefix heuristics (
"Set parameter",
"Academic"). - The input contract ("exactly one JSON line on stdin", read via
readline) is implicit and
unenforced; large inputs are written in full before stdout is drained (OS pipe-buffer
deadlock risk for very large networks).
Proposal
Exchange input and result as files (paths passed as arguments, e.g. into the existing
results directory or a temp dir): Python writes <run>_input.json, Julia writes
<run>_result.json; stdout remains purely a log channel. This removes the key-order trap, the
log/payload mixing and the pipe-buffer risk in one step.
Interim hardening (if stdout must stay temporarily): wrap the result in an unambiguous sentinel
(e.g. ###RESULT###{…}) instead of keying on {"name".
- 主要言語
- Python
- スター
- 48
- フォーク
- 22
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 38
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openego/eDisGo のほかの issue
-
area: database bug priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug correctness priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Spatial complexity reduction merges MV and LV buses when an LV grid has the ID of the MV gridオープンbug correctness priority: high
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug correctness priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
area: opf documentation priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
django-cms/djangocms-frontend#413 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NanmiCoder/MediaCrawler#1004 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
facebookresearch/xformers#1417 ·
-
question
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
vllm-project/vime#524 ·
メンテナーはふだん 7 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
FinanceFlash/unvibecode#675 ·
メンテナーはふだん 1 日以内に返信