Warn about non-idempotent values in MFILE#3351
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3351 +/- ##
==========================================
+ Coverage 27.11% 27.98% +0.86%
==========================================
Files 76 76
Lines 17736 18881 +1145
==========================================
+ Hits 4810 5284 +474
- Misses 12926 13597 +671 ☔ View full report in Codecov by Sentry. |
|
@j-a-foster @chris-ashe can you check that you can't reproduce this problem any more? I can't seem to reproduce it, but I've imitated it to test this solution. |
|
I've tested two input files on this branch, that fail on main, and they now pass. I can't see the warning in the OUT.DAT though? |
timothy-nunn
left a comment
There was a problem hiding this comment.
I agree with @j-a-foster that putting this warning and the table in the OUT.DAT (and maybe the MFILE.DAT) could be quite a good idea too.
I've decided not to put anything in the MFILE output, because I don't think it's the right place for error messages. |
timothy-nunn
left a comment
There was a problem hiding this comment.
Happy with the changes. Curious why there is a warn and print statement each handling half of the out. Maybe consider changing this if its not necessary.
| warnings.warn("\033[93m" + non_idempotent_warning) | ||
| print(non_idempotent_table + "\033[0m") |
There was a problem hiding this comment.
Why is all of the output not handled by the warn function?
There was a problem hiding this comment.
Quite right, I've combined these.
Warn, rather than raise exception, when MFILE variables are non-idempotent (still varying after 10 model evaluations). The variables and their values are put into a table in stdout.