Skip to content

Add core symbolic gradient support to Pyomo.DoE#3898

Open
snarasi2 wants to merge 442 commits intoPyomo:mainfrom
snarasi2:codex/merge-pyomo-doe-symbolic
Open

Add core symbolic gradient support to Pyomo.DoE#3898
snarasi2 wants to merge 442 commits intoPyomo:mainfrom
snarasi2:codex/merge-pyomo-doe-symbolic

Conversation

@snarasi2
Copy link
Copy Markdown

@snarasi2 snarasi2 commented Apr 1, 2026

Fixes # .

Summary/Motivation:
This PR ports the core symbolic-gradient functionality from the historical pyomo-doe-symbolic work into the current pyomo.contrib.doe implementation.

Summary/Motivation:

This PR ports the core symbolic-gradient functionality from the historical pyomo-doe-symbolic work into the current pyomo.contrib.doe implementation.

Rather than merging the old branch directly, this change transplants the symbolic DoE pieces onto current main so that symbolic sensitivities work with the newer DoE implementation already present in Pyomo, including the current objective and GreyBox-oriented code paths.

This PR is intentionally scoped to the core symbolic-gradient integration. It does not attempt to port every example, test refactor, or auxiliary change from the historical adowling2/pyomo-doe-symbolic branch in one step.

This contribution was prepared with coding assistance from OpenAI Codex. All design decisions, validation, testing, and quality-assurance responsibility remain with Shilpa Narasimhan.

Local validation included:

  • pyomo/contrib/doe/tests: 133 passed, 4 skipped, 5 warnings, 10 subtests passed
  • pyomo/contrib/doe/tests/test_greybox.py: 33 passed in HSL-enabled local environments

The remaining public-CI GreyBox cyipopt skips are environment-dependent and tied to MA57/HSL runtime availability.

Changes proposed in this PR:

  • add GradientMethod support to DesignOfExperiments
  • preserve the existing finite-difference workflow through the new gradient-method interface
  • add a symbolic / pynumero gradient path for DoE
  • add an analytic FIM computation path for non-optimization FIM evaluation
  • export ExperimentGradients from pyomo.contrib.doe
  • refactor ExperimentGradients so symbolic and automatic differentiation are set up together
  • add supporting symbolic-gradient utilities for labeled experiment models
  • update DoE model construction so symbolic sensitivities can be used in the Jacobian-based DoE machinery
  • add a guard preventing run_doe() from being called with GradientMethod.kaug
  • add the polynomial example and polynomial-focused regression coverage
  • add broader symbolic-versus-automatic gradient consistency tests
  • add factorial-result dataframe tests
  • add reactor regression tests against expected solutions
  • clarify the GreyBox cyipopt test skip reason when the MA57/HSL runtime is unavailable

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

sscini and others added 30 commits February 15, 2026 18:33
@snarasi2
Copy link
Copy Markdown
Author

snarasi2 commented Apr 10, 2026

@smondal13 @slilonfe5 @sscini For workflow modifications:
I removed the workflow-related changes from this PR as requested, but that appears to have re-exposed CI issues in the workflow/config layer rather than in the symbolic DoE code itself. In particular, the style-and-typos failure is likely due to removing the writeable allowlist entry from .github/workflows/typos.toml, and the process-coverage-* failures are likely due to reverting the added hashFiles('coverage.xml') != '' guard around the Codecov upload step. The symbolic DoE test changes themselves are still passing locally. Since the guidance was not to modify workflow files in this PR, I’ve left those workflow/config fixes out for now, but I’m happy to handle them separately if needed.

@snarasi2
Copy link
Copy Markdown
Author

@smondal13 I added a reviewer-facing markdown note to the PR that summarizes the scope, the main sensitivity/FIM equations, how those map onto the implementation, the test strategy, and the key caveats around Rooney-Biegler/polynomial coverage and the GreyBox cyipopt path (270bf8c).

Shilpa Narasimhan and others added 23 commits April 10, 2026 22:22
…od-combo

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

6 participants