Skip to content
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

Packages git-cloned or in virtualenv instead of links #37

Open
1 of 7 tasks
AlexandreMary opened this issue Nov 17, 2024 · 1 comment
Open
1 of 7 tasks

Packages git-cloned or in virtualenv instead of links #37

AlexandreMary opened this issue Nov 17, 2024 · 1 comment
Assignees

Comments

@AlexandreMary
Copy link
Contributor

AlexandreMary commented Nov 17, 2024

At the moment the python packages required by Davai (ial_build, ial_expertise, vortex, epygram, ecbundle + davai_taskutil) are links to pre-installed versions on given user accounts.

It could be better to git-clone them or to set up a virtualenv for each experiment ? (and in this case to publish these on PyPI).

Status of sub-packages on PyPI:

(This issue is a duplicate of ACCORD-NWP/DAVAI-env#9)

@tlestang
Copy link

tlestang commented Nov 20, 2024

Summary of a discussion with @AlexandreMary during the Davai WW 2024.

Currently it is expected that the davai-run_tests command is ran with the current working directory being a "experiment" directory as created by the davai-new_xp command.

This directory looks like this:

conf/
davai_taskutil -> DAVAI-tests/src/davai_taskutil
DAVAI-tests/
ecbundle -> /home/acrd/public/ecbundle/2.0.0/ecbundle
epygram -> /home/acrd/public/EPyGrAM/1.4.x
ial_build -> /home/acrd/public/IAL-build/1.2.6/src/ial_build
ial_expertise -> /home/acrd/public/IAL-expertise/1.1.6/src/ial_expertise
logs -> /ec/res4/scratch/sos/davai/logs/dv-0002-atos_bologna@sos
tasks -> DAVAI-tests/src/tasks
vortex -> /home/acrd/public/vortex

The DAVAI-tests directory is a clone of the repository, performed on the fly by the davai-new_xp command.

One option is to work with one python virtual environment per experiment, instead of a directory containing a clone of DAVAI-tests and links to existing installations of the various dependencies. This virtual environment would be created by the davai-new_xp command.

davai-new_xp

$ ls
dv-0002-atos_bologna@sos
$ ls dv-0002-atos_bologna@sos
bin include lib lib64 pyvenv.cfg

If we assume the dependencies (epygram`, `ial_build`, `ial_expertise and mkjob) can be installed via pip, they would installed within this virtual environment.

Now, instead of cloning the DAVAI-tests repo, we could instead pip install the tasks` and `davai_taskutil packages it contains, potentially merging them into one. With this package installed, a job generated by mkjob would be able to import the task module from the tasks package, e.g.

import tasks.<module> as todo

Running a davai experiment is now a matter of using the davai-run_exp providing a experiment id, or possibly the path to a experiment virtualenv:

davai-run_exp dv-0002-atos_bologna@sos

This would run the mkjob entry point located in the virtualenv for the dv-0002-atos_bologna@sos experiment.

The above assumes that both mkjob and vortex are available as regular pip installable package, which is not yet the case.

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

No branches or pull requests

2 participants