Make environment squashing optional#189
Conversation
dnerini
left a comment
There was a problem hiding this comment.
thanks for the nice contribution! I can see how this is really useful for debugging, although I'm slightly concerned that the option will be used a lot once we realize that it makes the code faster (the squash-fs step follows best practices from CSCS concerning python virtual envs)
| --ntasks={resources.ntasks} \ | ||
| anemoi-inference run config.yaml "${{CMD_ARGS[@]}}" | ||
| ' | ||
| fi |
There was a problem hiding this comment.
mmmh I'm not really happy with all this code duplication. Can we try avoid it?
There was a problem hiding this comment.
Updated in latest commit
| False, | ||
| description="If true, the ECCODES_DEFINITION_PATH environment variable will not be set to the COSMO local definitions.", | ||
| ) | ||
| skip_env_squashfs: bool = Field( |
There was a problem hiding this comment.
I wonder if we should phrase it in a "positive" sense and more in the uenv sense: using e.g. a --build-uenv flag that is true by default?
There was a problem hiding this comment.
Updated in latest commit
I see, that's a valid point. If this is the case, feel free to reject the PR |
maybe it's enough to hide it well ;) jokes asides, I really think this can be useful, so good documentation should be enough |
Add a
skip_env_squashfsboolean flag to RunConfig that allows bypassing squashfs image creation and using the virtual environment directly. I believe this can be useful during development or quick iterations where the ~5–10 min mksquashfs step is a bottleneck.Config example: