-
Notifications
You must be signed in to change notification settings - Fork 51
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
Time log based on new update #635
Conversation
@AminTorabi-NOAA It looks like this new version is missing |
@AminTorabi-NOAA I forget if we were going to add a |
@shorvath-noaa Yes, that was my understanding since other functions might be used in a loop, we can't simply add a print statement at the end of that function. Let me know if you want me to change the structure |
Oh thanks, I missed that. Let me know if there is any other comments. I'll address all together. |
@AminTorabi-NOAA Can you make those two changes to start with, particularly the _log_parameters? I can't test the rest of it until that is fixed. It would also be nice to go ahead an incorporate the edit to the finalize() function in bmi_troute.py |
src/troute_model.py
Outdated
|
||
|
||
def finalize(self,): |
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.
Could we rename this function? Something like print_timing_summary()?
src/troute_model.py
Outdated
time_value = self.task_times[key] | ||
percentage = (time_value / total_time) * 100 | ||
print( | ||
f'{key} construction: {time_value:.2f} secs, {percentage:.2f} %' |
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.
Can you update the print statement with specific text rather than using the task_times.keys()? Take a look at the print statements in main.py, but something like "Network graph construction: ..." rather than "network_time construction: ..."
percentage = (time_value / total_time) * 100 | ||
print( | ||
f'{key} construction: {time_value:.2f} secs, {percentage:.2f} %' | ||
) |
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.
Can you add another print('---') type line and then print the total run 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.
Nice work!
Time log is added that record the time for creating a network, forcing, run time, data assimilation and at the end output the results.
Additions
Removals
Changes
Testing
Screenshots
Notes
Todos
Checklist
Testing checklist
Target Environment support
Accessibility
Other