Totals dictionary with OpenMDAO >=3.31 has promoted names as keys #426
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.
Purpose
As of OpenMDAO 3.31, the dictionary of total derivatives returned by
compute_totals
uses user-facing (promoted) variable names as the keys. This broke a test that was using absolute names for the keys. I added a try/except block to try using the absolute names and if that throws aKeyError
use the promoted names instead.The fixes the test that failed a couple weeks ago.
Expected time until merged
A few days
Type of change
Testing
Run the tests in
test_multipoint_parallel.py
with OpenMDAO 3.30 and 3.31 with and without my changes.Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedfprettify
or C/C++ code withclang-format
as applicable