Repository navigation
chore(release): 0.3.3.post1 — hotfix alphaDeesp empty red_loops guard - #124
Merged
Merged
Conversation
added 2 commits
July 28, 2026 13:03
``get_dispatch_edges_nodes(only_loop_paths=True)`` computes ``list(set(red_loops.Path.sum()))``; on an EMPTY red_loops DataFrame pandas ``Series.sum()`` returns the scalar ``0.0`` (numpy.float64) instead of a concatenated list, so ``set()`` raises ``TypeError: 'numpy.float64' object is not iterable``. The pre-existing guard covered only ``antenna_mode``; the real condition is "no exploitable red loop" (a radial pocket is one instance). Condition extended to ``antenna_mode or _no_red_loop`` (red_loops absent / empty / no ``Path`` column), plus a ``try/except TypeError`` net for a ``Path`` column carrying a residual NaN. Defensive on the consumer side; alphaDeesp itself is not patched. Seven unit tests characterise the upstream defect and verify the guard. Cherry-picked cleanly from a651a40 onto v0.3.3 (identical _orchestrator.py). Measured downstream (Co-Study4Grid Matpower grading): fatal on 42/901 contingencies (4.7%), truncating action discovery and overestimating difficulty; after the fix, re-grading moved all 42 out of hard (hard->easy 21, hard->medium 21, none the other way). Signed-off-by: Antoine Marot <amarot91@gmail.com>
Post-release over 0.3.3: bumps version to 0.3.3.post1 (pyproject + __init__) and records the fix in the changelog. No API change, backward compatible. See the preceding fix(discovery) commit and a651a40. Signed-off-by: Antoine Marot <amarot91@gmail.com>
marota
force-pushed
the
release/0.3.3.post1
branch
from
July 28, 2026 11:03
7fd5fda to
d936d2b
Compare
marota
pushed a commit
to marota/Co-Study4Grid
that referenced
this pull request
Jul 28, 2026
Consumes the alphaDeesp empty-red_loops hotfix (ainetus/Expert_op4grid_recommender#124, tag v0.3.3.post1). The Matpower difficulty dataset in this branch was re-graded with that fix — 42 scenarios reclassified out of hard (hard->easy 21, hard->medium 21), tier split 440/368/62 -> 461/389/20. CHANGELOG updated. Signed-off-by: Antoine Marot <amarot91@gmail.com>
marota
pushed a commit
to marota/Co-Study4Grid
that referenced
this pull request
Jul 28, 2026
Consumes the alphaDeesp empty-red_loops hotfix (ainetus/Expert_op4grid_recommender#124, tag v0.3.3.post1). The Matpower difficulty dataset in this branch was re-graded with that fix — 42 scenarios reclassified out of hard (hard->easy 21, hard->medium 21), tier split 440/368/62 -> 461/389/20. CHANGELOG updated. Signed-off-by: Antoine Marot <amarot91@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hotfix release 0.3.3.post1
Post-release over 0.3.3 (
v0.3.3=main), no API change, backward compatible.The bug
action_evaluation.discovery._orchestrator.discover_and_prioritizeraisedTypeError: 'numpy.float64' object is not iterableon an emptyred_loopsDataFrame.
Structured_Overload_Distribution_Graph.get_dispatch_edges_nodes( only_loop_paths=True)computeslist(set(red_loops.Path.sum())); on an emptylist-of-lists column pandas
Series.sum()returns the scalar0.0(
numpy.float64) instead of a concatenated list, soset()raises.The pre-existing guard only covered
antenna_mode; a radial pocket is just oneinstance of the real condition, "no exploitable red loop".
The fix
_orchestrator.py: condition extended toantenna_mode or _no_red_loop(
red_loopsabsent / empty / noPathcolumn), plus atry/except TypeErrornet for a
Pathcolumn carrying a residual NaN. Purely defensive on theconsumer side — alphaDeesp itself is not patched.
(
tests/test_discovery_boucles_rouges_vides.py).a651a40ontov0.3.3(identical_orchestrator.py).Impact measured downstream (Co-Study4Grid Matpower dataset grading)
discovery truncated → difficulty overestimated.
hard(
hard → easy21,hard → medium21, none the other way).scenarios, identical ids.
Validation
test_expert_op4grid_analyzer::test_reproducibilityfailures arepre-existing on clean
v0.3.3(identical set) — an optionalpypowsybl2grid/numpy<2env dependency, unrelated to this change.__version__→0.3.3.post1.Tag
v0.3.3.post1pushed on the fork; the two commits are the isolated fix(
fix(discovery)) then the release chore (chore(release)).🤖 Generated with Claude Code