Skip to content

Replace deprecated Pyomo 'undo' with 'reverse' for relax_integer_vars#631

Closed
DLWoodruff wants to merge 4 commits into
Pyomo:mainfrom
DLWoodruff:pyomo_catchup
Closed

Replace deprecated Pyomo 'undo' with 'reverse' for relax_integer_vars#631
DLWoodruff wants to merge 4 commits into
Pyomo:mainfrom
DLWoodruff:pyomo_catchup

Conversation

@DLWoodruff
Copy link
Copy Markdown
Collaborator

@DLWoodruff DLWoodruff commented Mar 13, 2026

Summary

  • Pyomo 6.9.3 deprecated the undo option in the core.relax_integer_vars transformation in favor of reverse
  • Updated both occurrences: integer_relax_then_enforce.py and nonant_sensitivities.py

Test plan

  • Run run_all.py with the sslp test that uses --integer-relax-then-enforce and confirm no deprecation warning

🤖 Generated with Claude Code

DLWoodruff and others added 3 commits March 13, 2026 12:23
Pyomo 6.9.3 deprecated the 'undo' option in core.relax_integer_vars
in favor of 'reverse'. Updated both occurrences in
integer_relax_then_enforce.py and nonant_sensitivities.py.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pyomo's new API returns a ReverseTransformationToken from apply_to()
which must be passed back to reverse the transformation. Passing
reverse=True no longer works. Save the token from the initial
apply_to() call and use it when reversing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@DLWoodruff DLWoodruff requested a review from bknueven March 14, 2026 17:12
Copy link
Copy Markdown
Collaborator

@bknueven bknueven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this impose a higher minimum Pyomo version than we currently have?

@DLWoodruff
Copy link
Copy Markdown
Collaborator Author

It bumps the requirement from 6.4 to 6.9.3 so I will mark this one as draft for a while

@DLWoodruff DLWoodruff marked this pull request as draft March 20, 2026 02:26
The reverse transformation token API used by the relax_integer_vars
changes was introduced in Pyomo 6.9.3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@c8a4315). Learn more about missing BASE report.

Files with missing lines Patch % Lines
mpisppy/utils/nonant_sensitivities.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #631   +/-   ##
=======================================
  Coverage        ?   65.09%           
=======================================
  Files           ?      149           
  Lines           ?    18392           
  Branches        ?        0           
=======================================
  Hits            ?    11973           
  Misses          ?     6419           
  Partials        ?        0           

☔ 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.

@DLWoodruff DLWoodruff closed this May 15, 2026
@DLWoodruff DLWoodruff deleted the pyomo_catchup branch May 15, 2026 21:04
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.

2 participants