-
Notifications
You must be signed in to change notification settings - Fork 0
Isolate test environment on NCI #27
Comments
I just rang a couple tests on gadi using virtual environments and micromamba environments, just to see if there was a decent size comparison between the two. The virtual environments were a third of the size and number of files of the micromamba environment. I ran a small MOM6 experiment using the payu in the virtual environment and it seemed to work fine. Creating a virtual environment:
Creating a micromamba environment:
Using pip install in virtual environment by default ignores any global or user installed packages. While the micromamba environment, when using pip, looks at user installed packages - so might need to set PYTHONNOUSERSITE I also just a tested creating a |
This is really thorough, and interesting, thanks. The So it sounds feasible to not have I know this wasn't the purpose of your tests above, but we could have a base Now I'm wondering if we could run a Sorry that is off topic, but if I couldn't think of another place to put it. |
I was wrong earlier, I think it would be possible to run venv through module load as it would be similar to the conda modulefiles of inspecting what environment variables have changed. A key part part would be loading a specific python version. I've noticed running |
Currently, in the repro tests, the
payu
environment invk83
is loaded, and the test requirements of ACCES-NRI/model-config-tests are installed usingpip install
:reproducibility/.github/workflows/checks.yml
Line 77 in 5c3ca6f
This is modifying the
payu
environment. Even if it was installed to a user directory usingpip install --user
, there's a flag in payu environment that disables looking for packages installed in~/local
- https://github.com/ACCESS-NRI/payu-condaenv/blob/c26c5bb986a60f3feb7f88b7bf6c2d79ccf37b7f/modules/.common#L50-L51This might not work long term with multiple concurrent repro tests being run from the same user account and
model-configs-tests
having different versions.There is a related issue here is for packaging up
model-config-tests
: ACCESS-NRI/model-config-tests#3The repro tests could run similarly to the github runners with setup/teardown? (see QA pytests: https://github.com/ACCESS-NRI/access-om2-configs/blob/a57e7fd10c351edef7427ddf42c71ce53c24df27/.github/workflows/pr-1-ci.yml#L114-L143)
So if using
venv
/conda
(? If using conda/micromamba, will need to use an install from somewhere)I think the eventual
model-config-tests
package should require a versionedpayu
, and this will be included in test environment. So this test environment is entirely separate from thepayu
environment invk83
. I thinkmodel-config-tests
might require functions/features in a version of payu. For example, adding access-om3 model tomodel-config-tests
uses the payu package: ACCESS-NRI/model-config-tests#19 (comment))@CodeGat @aidanheerdegen I wrote this quickly so hopefully it makes some sense. Would appreciate any more thoughts and concerns
The text was updated successfully, but these errors were encountered: