Open mandresm opened 4 months ago
@pgierz, I'm putting this into clickup and assign it to you, if you don't have time for it we can reassign it to me in some point.
Hey Miguel, I have something that might be able to handle caching very easily. Have a look at the newest commit.
Cache seems to be working now as I would expect:
2024-08-07 10:10:03.938 | CRITICAL | esm_runscripts.prepare:add_vcs_info:700 - Experiment information is being stored for usage under:
2024-08-07 10:10:03.940 | CRITICAL | esm_runscripts.prepare:add_vcs_info:701 - >>> /albedo/work/user/pgierz/SciComp/Projects/esm-tools-vcs/experiments/test-007/run_18500201-18500228/log//test-007_vcs_info.yaml
2024-08-07 10:10:03.940 | CRITICAL | esm_runscripts.prepare:add_vcs_info:703 - >>> CACHE FILE EXISTS!
2024-08-07 10:10:03.940 | CRITICAL | esm_runscripts.prepare:add_vcs_info:704 - >>> Last modification time of cache: 1723017728.2125185
2024-08-07 10:10:03.941 | CRITICAL | esm_runscripts.prepare:add_vcs_info:713 - Locating echam
2024-08-07 10:10:03.952 | DEBUG | esm_runscripts.helpers:is_older_than:477 - Checking modification times:
2024-08-07 10:10:03.952 | DEBUG | esm_runscripts.helpers:is_older_than:478 - /albedo/work/user/pgierz/SciComp/Projects/esm-tools-vcs/experiments/test-007/log//test-007_vcs_info.yaml: 1723017728.2125185
2024-08-07 10:10:03.952 | DEBUG | esm_runscripts.helpers:is_older_than:479 - /albedo/work/user/pgierz/SciComp/Projects/esm-tools-vcs/model_codes/awiesm-2.1/echam-6.3.05p2: 1722867496.347289
2024-08-07 10:10:03.952 | CRITICAL | esm_runscripts.prepare:add_vcs_info:722 - Using cached VCS info for echam
I added an Audit Log, which has all possible info you could possibly wish for to check modification times, access times, and checksums. See in src/esm_runscripts/checksum_helpers.py
This, together with the git stuff, should give all possible information someone would want if their model changed halfway during the experiment.
Only thing left to do is parallelising the git diff and checksum parts.
VCS fixes and improvements.
TODO
For this PR I will not implement the checking functionality, only the writing of the git status and diff file.