Skip to content

docs(rho_setting): document grad-rho options + flag sep-rho/reduced-costs-rho deprecations#680

Open
DLWoodruff wants to merge 1 commit into
Pyomo:mainfrom
DLWoodruff:grad_rho_doc
Open

docs(rho_setting): document grad-rho options + flag sep-rho/reduced-costs-rho deprecations#680
DLWoodruff wants to merge 1 commit into
Pyomo:mainfrom
DLWoodruff:grad_rho_doc

Conversation

@DLWoodruff
Copy link
Copy Markdown
Collaborator

Summary

Doc-only follow-up to #679. Two changes:

  1. Document the gradient-rho options. rho_setting.rst previously
    described only --grad-rho-multiplier out of the six options
    cfg.gradient_args() registers. Add a bullet list covering all
    five undocumented options:

    • --grad-order-stat (default 0.5) — order statistic across
      scenarios; 0 = min, 1 = max, 0.5 = mean, with linear interpolation
      in the open intervals.
    • --grad-rho-relative-bound (default 100) — floor on the
      primal-residual denominator relative to xbar.
    • --eval-at-xhat (default off) — evaluate the gradient at the
      best xhat from an xhat-producing spoke instead of at the latest
      subproblem iterate.
    • --indep-denom (default off) — use a single
      probability-weighted, MPI-Allreduced denominator across scenarios.
    • --grad-rho-multiplier (default 1.0) — scalar multiplier
      applied to every computed rho (already documented; left in for
      completeness in the same list).
  2. Flag --sep-rho and --reduced-costs-rho as scheduled for
    deprecation.
    Per
    issue #673 <https://github.com/Pyomo/mpi-sppy/issues/673>_, both
    methods are slated for removal: SepRho is expected to be
    subsumed into GradRho, and reduced-cost rho has not been
    demonstrated to be effective in practice. PR rho setters: aggregate per-sub-scenario nonants in proper bundles (closes #673) #679 has already
    added a DeprecationWarning at instantiation; this PR adds an
    .. note:: on each section so the rendered docs match.

grad_rho.rst stays a brief pointer (the academic paper covering the
algorithm is in preparation); a .. _grad_rho: cross-reference label
is added so rho_setting.rst can link to it.

Test plan

  • cd doc && make html builds without new warnings (verified
    locally — the only warning is the pre-existing
    viewcode_import config typo, unrelated).
  • Read the Docs preview renders the new option list and deprecation
    notes correctly.
  • No code changes; non-docs CI is N/A.

🤖 Generated with Claude Code

The --grad-rho section previously documented only --grad-rho-multiplier
out of six gradient-rho options. Add a bullet list covering all five
previously-undocumented options (--grad-order-stat,
--grad-rho-relative-bound, --eval-at-xhat, --indep-denom, plus the
already-mentioned multiplier) with their defaults and a one-line
operational description.

Add a .. note:: deprecation notice to the --sep-rho and
--reduced-costs-rho sections referencing Pyomo#673 so users can plan
migration; both rho setters now emit a DeprecationWarning at
instantiation as part of the same issue's cleanup.

grad_rho.rst stays a brief pointer; deeper algorithmic content is
planned for after the academic paper lands. Add a .. _grad_rho:
cross-reference label so rho_setting.rst can link to it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@DLWoodruff DLWoodruff marked this pull request as ready for review May 7, 2026 21:49
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.03%. Comparing base (bfc2ce3) to head (9f0c54d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #680      +/-   ##
==========================================
+ Coverage   71.02%   71.03%   +0.01%     
==========================================
  Files         154      154              
  Lines       19248    19248              
==========================================
+ Hits        13670    13672       +2     
+ Misses       5578     5576       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant