metrumresearchgroup / bbi

Next generation modeling platform
https://metrumresearchgroup.github.io/bbi/docs
12 stars 2 forks source link

Whitespace removed from end of .ctl file after NONMEM run #168

Closed adamlafontaine closed 4 years ago

adamlafontaine commented 4 years ago

Trailing whitespace appears to be removed as a result of running a NONMEM .ctl file. We believe this is an issue associated with babylon as the change does not occur when run using other tools.  

colordiff 100.ctl 100/100.ctl

Screen Shot 2020-05-14 at 1 39 19 PM

 

This can cause issues when trying to check for file changes by comparing the hashes of the .ctl files outside and inside of the individual run folder. The result is that all files appear as if they have changed even immediately following a model run.

Screen Shot 2020-05-14 at 1 48 16 PM
dpastoor commented 4 years ago

We have identified this is an issue in how we are copying the file into the run directory. Thanks for the heads up - we will update with a patch!

dpastoor commented 4 years ago

per discussion with @shairozan - likely best to just pre-hash the file before copying rather than trying to think of all cases that could change during copying - plus account for the .mod vs .ctl data injection differences.

adamlafontaine commented 4 years ago

I agree. Would the hash be stored somewhere in the the yaml then?

shairozan commented 4 years ago

It's not by default as they're not a configuration option. I will have to make sure that they are persisted somehow between local execution phases and the SGE phase. Gotta thing through the best approach for it.

dpastoor commented 4 years ago

This is now addressed for ctl files by switching the read/write implementation to make sure its a clean copy if there is no need to modify the data path. We still may need to address more holistically to consider .mod files as well, but as @shairozan mentioned this will take some more planning around the sge/local interactions