Skip to content

Make environment squashing optional#189

Open
lclanzi wants to merge 2 commits into
mainfrom
feat/make-squash-env-optional
Open

Make environment squashing optional#189
lclanzi wants to merge 2 commits into
mainfrom
feat/make-squash-env-optional

Conversation

@lclanzi

@lclanzi lclanzi commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Add a skip_env_squashfs boolean 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:

  - forecaster:
      checkpoint: https://servicedepl.meteoswiss.ch/mlstore#/experiments/409/runs/b30acf68520a4bbd8324c44666561696
      label: stage_C_icon_1km
      steps: 0/120/6
      skip_env_squashfs: true
      config: resources/inference/configs/sgm-forecaster-global-ich1-oper.yaml

@lclanzi lclanzi requested review from dnerini and frazane and removed request for dnerini June 17, 2026 12:00

@dnerini dnerini left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmmh I'm not really happy with all this code duplication. Can we try avoid it?

@lclanzi lclanzi Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in latest commit

Comment thread src/evalml/config.py Outdated
False,
description="If true, the ECCODES_DEFINITION_PATH environment variable will not be set to the COSMO local definitions.",
)
skip_env_squashfs: bool = Field(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in latest commit

@lclanzi

lclanzi commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

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)

I see, that's a valid point. If this is the case, feel free to reject the PR

@dnerini

dnerini commented Jun 17, 2026

Copy link
Copy Markdown
Member

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)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants