#387 - Add Execution Timing for Green Code Initiative #388
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.
Update all copyright notice dates to 2022-2025.
Change time calculations to use time.perf_counter (cpu time used) instead of time.time (wall time), and output in seconds rather than minutes.
Exclude csv files in .gitignore (exclude tracking results from sync)
Add green_code.py module with GreenCodeTracking Class definition. Can be extended with additional hooks / more advanced tracking as needed. Saves results to csv file in project root, formatted correctly for the tracking spreadsheet (https://docs.google.com/spreadsheets/d/15NXZs0HvHZhGMvgVDyDMyeR0i8ExWEDgkaK-fVB2m38). If verbose passed, output tracking info to terminal.
Poetry add libraries psutil, py-cpuinfo (for green_code system info) and pytest-mock (for unit testing green_code module).
Add 'GPU' optional dependency group to poetry toml (for optional install of nvidia GPU info library).
Add test_green_code.py for unit testing new module.
Add green_code helper.py function and unit test in test_helper.py
Add wrapper to execute main baler.py inside GreenCodeTracker (called from helper.py)
tests.sh passes successfully - warning on test_lr_scheduler re. verbose being deprecated.
Syntax.sh passes successfully.
All baler modes run successfully.