-
Notifications
You must be signed in to change notification settings - Fork 74
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
Optionally zip files at the end of jobs #414
Conversation
Thanks @gpetretto. I think this is a great change, but can you use the existing gzip functionality in atomate2/src/atomate2/utils/file_client.py Line 351 in 0955d70
|
Actually, one does not typically use the file client directly but instead the helper functions in
Edit: we already have a gzip_files function! atomate2/src/atomate2/common/files.py Line 172 in 0955d70
|
Thanks for pointing it out. Since it was originally using the monty gzip_dir I did not realize there was already an alternative in atomate2. Sorry. I tried to simply switch to atomate2/src/atomate2/common/files.py Lines 324 to 326 in 0955d70
the execution fails, as it still adds the files in the include_files list, even if they don't exist.I am not sure in which case it would be useful to have the file in the list of filtered files, even when it does not exist. May I remove that else condition in find_and_filter_files ? Otherwise I will need to perform the check with glob before calling gzip_files .
|
I believe you can just set allow_missing to True? |
Sorry, I missed that again. I switched to the |
I think this would be fine. Might be best to just |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #414 +/- ##
==========================================
- Coverage 65.71% 65.64% -0.08%
==========================================
Files 78 78
Lines 7462 7495 +33
Branches 964 975 +11
==========================================
+ Hits 4904 4920 +16
- Misses 2255 2270 +15
- Partials 303 305 +2
|
I don't think I can do that while making a standard test, since the mocked execution still parses the outputs. Is there already a way to bypass the parsing? A minimal working test seems to need at least real vasprun.xml, OUTCAR and CONTCAR files. Otherwise an overall easier way would be to move this portion of the code: atomate2/src/atomate2/vasp/jobs/base.py Lines 223 to 227 in 5711de0
to a zip_vasp_files function and test it on its own.
|
I see. I'm not sure of the best way to do it. Unless we add some additional logic to the tests for specifically checking the gzip status. |
I tried to move the logic to a common function and test only its behavior. |
I will merge this for now. Thanks very much @gpetretto |
Summary
Implementation for the option to tune the zip of files at the end of (vasp) Jobs, as discussed in #361.
3 options are available: zipping all the files, zipping only code specific files or no zipping at all.
For vasp I gathered inputs and outputs from the links in #361, and added a few more that were not mentioned there.
TODO