gridfm / gridfm/gridfm-graphkit

add branch level predictions to output

Open
#96 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
105
Forks
36
Avg merge
1d 8h
Merged PRs (30d)
9

Description

Summary
The graphkit predict command (and the --save_output flag on train/test) currently writes a single bus-level parquet file for the PowerFlow task. Branch-level quantities such as active/reactive power flows, thermal loading, angle differences, and violation flags are already computed within predict_step, but are not currently included in the saved outputs.
Exposing these branch-level results would enable downstream workflows such as branch-level uncertainty analysis, congestion assessment, and N-1 security studies directly from GraphKit outputs, without requiring users to reimplement branch flow calculations outside the framework.

Desired behaviour
Extend predict_step to return a two-table dictionary, following the pattern already used by the OPF task, allowing both bus-level and branch-level outputs to be written by the existing CLI logic.
This would produce:
• {grid_name}_predictions.parquet — bus-level results (unchanged)
• {grid_name}_branch_predictions.parquet — branch-level results (new)

Rationale
Branch-level metrics are often the quantities of interest for operational and planning studies, including:
• Thermal loading and overload analysis
• Congestion assessment
• N-1 security evaluation
• Probabilistic and uncertainty-based risk studies

Since these quantities are already computed during inference, making them available in the saved outputs would improve the usability of the framework for downstream analysis while requiring only a small extension to the existing output structure.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at predict_step for the PowerFlow task and compare its return structure with the OPF task, then trace the existing predict command and --save_output CLI logic. Extend the output path so bus-level predictions remain in {grid_name}_predictions.parquet and branch-level results are written to {grid_name}_branch_predictions.parquet.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, data, machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.