-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PySMO: fix warnings #1472
PySMO: fix warnings #1472
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1472 +/- ##
==========================================
- Coverage 76.36% 76.36% -0.01%
==========================================
Files 394 394
Lines 65130 65136 +6
Branches 14429 14429
==========================================
+ Hits 49737 49740 +3
- Misses 12831 12835 +4
+ Partials 2562 2561 -1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @OOAmusat. From a quick look through the pytest job output log, I believe this resolves all of the unanticipated warnings from the PySMO submodules (i.e., I wasn't able to spot any).
The only one that looks like it might be related is the following:
However, if you feel this belongs outside of PySMO's "jurisdiction", then feel free to disregard and we can address it at a later time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. My only questions is just to confirm that the warnings about invalid values in logs is not a sign of underlying issues.
Fixes
#1403, #1363
Summary/Motivation:
Recent changes to the numpy backend have resulted in a large number of deprecation warnings (>7500) being raised in PySMO. This PR makes changes to address these warnings.
Changes proposed in this PR:
y[i, 0] = x
. This is resolved in this PR by either extracting the specific elements of the scalar (y[i, 0] = x[0]
) or using the item method (y[i, 0] = x.item()
)warnings.warn
with the idaes logger warnings, and fix tests to usecaplog
to reflect this change@pytest.mark.filterwarnings
to specific tests to ignore runtime warnings aroundnp.log
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: