-
Notifications
You must be signed in to change notification settings - Fork 8
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
doc: error and progress logging for information.hpp #424
Conversation
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.
I was able to successfully build and test this PR locally. It outputs to fims.log in the root directory, but because output is appended it is difficult to parse and check functionality b/c its unclear if errors are expected or not. The only mandatory changes I suggest are to fix address location printing. A few suggestions for discussion/consideration:
- File should not append from previous runs. How will this work when we run multiple FIMS models in parallel?
- The file is very hard to read. I suggest more white space to indent like regions (e.g., all likelihood checks for a given fleet), and breaks between major sections (e.g., selex and growth).
- I mentioned it below but I don't think printing the whole data set to the log is necessarily a good idea. I suggest we consider just printing the first and last 3 observations. It's possible something can go wrong in other years, but the user won't detect that from this file. Instead, I think that FIMS should check for invalid individual likelihood components as it calculates them and be able to error and with informative messages like "nll for age comps for fleet 1 year 35 is invalid" then print the observed and expected before exiting.
Codecov ReportPatch coverage is
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
📢 Thoughts on this report? Let us know!. |
Given that this is just a branch and not the main trunk, I would suggest that the commit history be fixed to just wipe out the last four commits and roll it back to 34617f5. This can easily be done with
or through an interactive rebase which is easier with git lens where you can just choose to drop the last four commits. I am happy to do either option or walk someone through the steps so that others can learn. But in my opinion there is no reason to push four commits that we essentially do not want into main. |
98011ec
to
34617f5
Compare
Thanks Cole, in response to comments:
|
@Cole-Monnahan-NOAA see Nathan's response - I think you need to approve that he has addressed your comments before we can merge this in. We are planning to fix the issue of four runs being printed after we merge in pull request #453 since the Rcpp refactor will change where it needs to be written to the log. and thanks @kellijohnson-NOAA for giving me the emotional support and git syntax I needed to do a hard reset. |
Added progress and error logging to information.hpp
34617f5
to
630506a
Compare
What is the feature?
Add FIMS_LOG outputs to monitor progress and errors in information.hpp
How have you implemented the solution?
Added lots of FIMS_LOG calls throughout CreateModel() function
Does the PR impact any other area of the project?
No
Input
None
Output
Reports more details to the existing fims.log file.
How to test this change
No new tests
Developer pre-PR checklist
devtools::check()
locally and the package compiled and all R tests passed. If there are failing tests, rundevtools::test(filter = "file_name")
(where "test-file_name.R" is the file containing the failing tests) to troubleshoot tests.