design: ADMM user-API automation, phased plan A-E#684
Closed
DLWoodruff wants to merge 2 commits into
Closed
Conversation
Drafts a phased rollout of the ADMM user-API automation discussed in
the ongoing admm-doc-crossref thread:
A. Auto-build the scenario tree for --stoch-admm (new
first_stage_cost / first_stage_varlist module hooks; wrapper
calls attach_root_node itself).
B. Accept Pyomo Var/VarData in consensus_vars_creator (normalize
to var.name internally; back-compat with strings).
C. Default combining_names / split_admm_stoch_subproblem_scenario_name
pair in mpisppy.utils.stoch_admmWrapper.
D. Default admm_stoch_subproblem_scenario_names_creator with correct
nesting (outer = stoch, inner = admm).
E. Document admm_args as canonical for ADMM CLI args; drop
redundant registrations from example inparser_adder funcs.
Each phase: own branch, own PR, own tests, keeps the old API as a
fallback. Item F (merging AdmmWrapper and Stoch_AdmmWrapper) is
explicitly out of scope.
Multistage-origin stoch-admm is also out of scope: the BFs=None branch
in stoch_admmWrapper is the only path exercised by any caller today.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Phase A: scenario form (first_stage_cost(scenario) / first_stage_varlist(scenario)). Phase C: default delimiter is __ADMM__ (verbose but unambiguous; safe for shells, filenames, CSV writers). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #684 +/- ##
==========================================
+ Coverage 71.02% 71.03% +0.01%
==========================================
Files 154 154
Lines 19248 19252 +4
==========================================
+ Hits 13670 13676 +6
+ Misses 5578 5576 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
Closing while we iterate on the design and implement phase A. Will reopen (or replace with a successor PR) once the API is exercised by phase A's implementation and feels stable. |
DLWoodruff
added a commit
to DLWoodruff/mpi-sppy-1
that referenced
this pull request
May 13, 2026
Adds the design doc that motivates this PR's phase A implementation.
The doc covers all five phases (A-E) but only phase A is implemented
here; B-E will follow as separate PRs.
A. Auto-build the scenario tree for --stoch-admm via new
first_stage_cost / first_stage_varlist module hooks (this PR).
B. Accept Pyomo Var/VarData in consensus_vars_creator.
C. Default combining_names / split_admm_stoch_subproblem_scenario_name
pair in mpisppy.utils.stoch_admmWrapper, with __ADMM__ as the
delimiter.
D. Default admm_stoch_subproblem_scenario_names_creator with the
correct nesting (outer = stoch, inner = admm).
E. Drop redundant ADMM-arg registrations from example
inparser_adder functions; admm_args is canonical.
Item F (merging AdmmWrapper and Stoch_AdmmWrapper) and
multistage-origin stoch-admm are explicitly out of scope.
Each phase is independently shippable, preserves the old API as a
fallback, and migrates the canonical example. Phase A's per-scenario
error matrix (hooks-x-attached) and its both-or-neither contract are
spelled out in section 2 of the doc, and the implementation in this
PR matches.
The design doc was originally drafted on a separate branch and went
through review (closed PR Pyomo#684) before phase A was implemented; the
"files" list in section 2 was updated after implementation to
reflect findings (AdmmBundler needed the same plumbing,
consensus_vars_creator required a refactor away from
_mpisppy_node_list, the custom driver had to forward hooks too).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Summary
--stoch-admmvia newfirst_stage_cost(scenario)/first_stage_varlist(scenario)module hooks soStoch_AdmmWrappercallsattach_root_nodeitself (eliminating the asymmetry vs--admm).Var/VarDatainconsensus_vars_creator(normalize tovar.nameinternally; strings still work).combining_names/split_admm_stoch_subproblem_scenario_namepair using__ADMM__as the delimiter (verbose but safe for shells/filenames/CSV).admm_stoch_subproblem_scenario_names_creatorwith correct nesting (outer = stoch, inner = admm).admm_argsas canonical for ADMM CLI args; drop redundant registrations from exampleinparser_adderfunctions.AdmmWrapperandStoch_AdmmWrapper) and multistage-origin stoch-admm are explicitly out of scope.admm-doc-crossrefcommit24bf5802("clarify attach_root_node contract differs for --admm vs --stoch-admm") will be superseded by phase A's PR.Test plan
mainonce this design merges🤖 Generated with Claude Code