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

From_step acting as a filter #1981

Closed
wants to merge 7 commits into from
Closed

From_step acting as a filter #1981

wants to merge 7 commits into from

Conversation

kinow
Copy link
Member

@kinow kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 2, 2024, 16:03

This fixes an issue where the from_step filter acts as a filter even if all the filters are "natural" or not set.

Pending the test ( no time today)

#1426 check this issue for info

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 2, 2024, 16:45

added 1 commit

  • 8dc3a37 - Added test ( not pytest )

Compare with previous version

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 2, 2024, 16:45

Added a unit test since the other related tests are not yet pytest

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 2, 2024, 16:47

added 1 commit

  • 03c0ce2 - Added test ( not pytest )

Compare with previous version

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 2, 2024, 16:48

requested review from @kinow

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 3, 2024, 11:46

added 1 commit

Compare with previous version

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 3, 2024, 11:51

Hello @kinow

I've added two additional things:

  1. If all the filters introduced are "natural," don't consider it a "special_filter," and instead run the natural_dependencies_filter calculation. Added unit_test
  2. Added another condition to fill up the depends_on_previous_special_section dictionary

This should only trigger if the job section depends on itself otherwise it doesn't make sense

JOBS:
 A: 
   DEPENDENCIES:
     A:
     # or A-1:

I've tested it with the regression test and found no issues ( commented here https://earth.bsc.es/gitlab/es/autosubmit/-/issues/1430 to implement unit tests that cover all cases )

I'll add this as module autosubmit-dev so it can be tested

Related to #1426 @fyi @ainagaya, @lauherrero

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 3, 2024, 12:00

added 1 commit

Compare with previous version

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 3, 2024, 12:34

Had an issue on deployment..

++ return 0
++ eb autosubmit-dev-foss-2021b-Python-3.9.6.eb --rebuild
ERROR: Failed to parse configuration options: "Failed to create temporary directory (tmpdir: /dev/shm/tmp): [Errno 20] Not a directory: '/dev/shm/tmp/eb-a2wesc4q'"

Asked Albert, but seems a filesystem issue

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 3, 2024, 14:22

There is no space left due to some modifications taking place.

According to Albert, there will be space tomorrow, So tomorrow I'll upload it

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @kinow on Oct 4, 2024, 10:31

Will have to review this one next week (trying to finish a review for @franra9, and also working on the deliverable). But I think we might need something in our docs for this? Not sure if we already have an example somewhere (if so, then that won't be needed here I think). Thanks @dbeltrankyl !

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 4, 2024, 12:12

Tried again after the maintenance, but the same still happens, waiting for Albert input

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 4, 2024, 12:15

It is already documented on https://autosubmit.readthedocs.io/en/master/userguide/defining_workflows/index.html#start-conditions, although the example only shows the most simple way of doing it.

Maybe once the workflow is fully done, we can add it as an additional example? Explaining for what the workflow is and well, like a how-to recipe

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @kinow on Oct 4, 2024, 12:24

Maybe once the workflow is fully done, we can add it as an additional example? Explaining for what the workflow is and well, like a how-to recipe

Good idea. Maybe we should create an issue in this milestone so we don't forget too.

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 7, 2024, 08:33

Tried again,

They are looking at it, seems that the TMP dir is not mounted for unknown reasons ( and easybuild relies on making the temporal stuff, in the tmp dir ). Albert will warn me when it is solved

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 8, 2024, 11:23

Hello @kinow

I tried to deploy the version as Albert told me that tmp issue was ( temporally, they will do a reboot afternoon) solved, and I had an issue with this (non-related to this merge):

ImportError: cannot import name 'LiteralString' from 'typing_extensions' (/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/site-packages/typing_extensions.py)

https://earth.bsc.es/gitlab/es/autosubmit/-/blame/master/autosubmit/monitor/diagram.py#L39
https://earth.bsc.es/gitlab/es/autosubmit/-/blame/master/autosubmit/monitor/diagram.py#L307

Do you know any alternative?

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @kinow on Oct 8, 2024, 13:41

Can't we update typing-extensions on that environment?

I had a look at 4.9.0 in the hub, and it is loading typing-extensions 3.10.0.0.. The latest version of typing-extensions is 4.12.2.

The LiteralString was added in 4.1.0, https://typing-extensions.readthedocs.io/en/latest/index.html#typing_extensions.LiteralString

  • 3.10.0.0: Aug 30, 2021
  • 4.1.0 : Feb 12, 2022
  • 4.12.2 : Jun 07, 2024

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 8, 2024, 15:47

Hello @kinow ,

Sorry for the delayed answer

Shouldn't it be taking the typing-extensions from the site-packages of autosubmit?

When I perform a module load autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6, pip is showing.

typing==3.7.4.3
typing_extensions==4.9.0

Which should be correct but..

autosubmit -v is crashing because it seems to be taking the one in /shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/site-packages/typing_extensions.py

And I can see the egg for the 4.9.0 version inside:

/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/lib/python3.9/site-packages/

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @kinow on Oct 9, 2024, 08:05

Shouldn't it be taking the typing-extensions from the site-packages of autosubmit?

I thought it should.

Which should be correct but..

The VPN is not working for me right now, but I will try again in a few hours and try the dev module you shared.

Thanks Dani!

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @kinow on Oct 9, 2024, 08:43

I think the module is not yet available to every user?

[bdepaula@ bsceshub02 ~]$ module load autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6
Lmod has detected the following error:  The following module(s) are
unknown: "autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6"

Please check the spelling or version number. Also try "module spider ..."
It is also possible your cache file is out-of-date; it may help to try:
  $ module --ignore_cache load
"autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6"

Also make sure that all modulefiles written in TCL start with the string
#%Module

And I can see the egg for the 4.9.0 version inside:

/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/lib/python3.9/site-packages/

Yes, that looks right. Do you know if I need to run some command in order to load this 4.1.11 you created? I tried a couple of module use /shared/..., but those didn't work 😓

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 9, 2024, 09:20

Hello @kinow ,

I'm sorry. I tried again yesterday and used EasyBuild's safety check feature, which removes the module if it is not okay.

I rebuild it now so that you can use it

And if you have eadmin access you can rebuild the module with

eb autosubmit-dev-foss-2021b-Python-3.9.6.eb --rebuild or with the ./prepare_autosubmit_dev.sh ( I'm using rebuild right now, because I did some changes to setup to force that typing extensions version )

The code is the following.

module:

easyblock = "PythonPackage"

name = 'autosubmit'
version = '4.1.11.dev0-d6f0d798'

homepage = 'http://autosubmit.readthedocs.org'
description = """A versatile tool for managing ESM on HPC platforms"""

toolchain = {'name': 'foss', 'version': '2021b'}

sources = ['%(name)s-%(version)s.tar.gz']
cleanupoldinstall = True
python = 'Python'
pyver = '3.9.6'
pyshortver = '3.6'
versionsuffix = '-%s-%s' % (python, pyver)

dependencies = [
    (python, pyver),
    ('libpng','1.6.37'),
]

#use_pip = True
# override extensions sanity check, default filter that imports a Python module doesn't work here
exts_filter = ('', "")

sanity_check_paths = {
    'files': ['bin/autosubmit'],
    'dirs': [],
}
#sanity_check_commands = [('autosubmit -v','')]

set -xe
  
BRANCH='GL-1426-filters-fix'
MODULENAME='4.1.11.dev0-d6f0d798'
PYVERSION='3.9.6'

module load git
git clone -b $BRANCH https://earth.bsc.es/gitlab/es/autosubmit.git autosubmit-$MODULENAME
module purge
cd autosubmit-$MODULENAME
cd ..
tar cvfz autosubmit-$BRANCH.tar.gz autosubmit-$MODULENAME
module load EasyBuild
eb autosubmit-dev-foss-2021b-Python-$PYVERSION.eb --rebuild
rm autosubmit-$BRANCH.tar.gz
rm -rf autosubmit-$MODULENAME

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 9, 2024, 09:26

I'm tagging @albertvilabsc and @stamenminkov in case they have any idea.

Please look only from this comment and the replies: https://earth.bsc.es/gitlab/es/autosubmit/-/merge_requests/493#note_311051

Strangely, this should have happened before with other Autosubmit modules version, so maybe it is something related to the hub updates?

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @stamenminkov on Oct 9, 2024, 10:29

Hi @dbeltrankyl @kinow,

I'll check this as soon as I can!

Cheers, Stamen

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @kinow on Oct 9, 2024, 13:08

It's strange. Looking at the PYTHONPATH values, it looks like Python should load the Autosubmit module you created, Dani, first.

[bdepaula@ bsceshub02 ~]$ python -c 'import sys; print(sys.path)'
['', '/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/lib/python3.9/site-packages', '/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/easybuild/python', '/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python39.zip', '/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9', '/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/lib-dynload', '/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/site-packages']

@dbeltrankyl , I had a look at the easybuild.pth file created for easybuild in the AS directory.

[bdepaula@ bsceshub02 ~]$ cat /shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/lib/python3.9/site-packages/easy-install.pth 
./autosubmit-4.1.10-py3.9.egg
./autosubmitconfigparser-1.0.67-py3.9.egg
./psutil-5.6.1-py3.9-linux-x86_64.egg
./typing_extensions-4.9.0-py3.9.egg
./bscearth.utils-0.5.2-py3.9.egg
./pathlib-1.0.1-py3.9.egg
./arcp-0.2.1-py3.9.egg
./bioblend-1.3.0-py3.9.egg
./aiohttp-4.0.0a1-py3.9-linux-x86_64.egg
./async_timeout-3.0.1-py3.9.egg
./multidict-4.7.6-py3.9-linux-x86_64.egg
./chardet-3.0.4-py3.9.egg

So these should be loaded, which looks correct. Then the setuptools.pth will load all the other packages. I am not sure what's the order that these files are loaded, but maybe that could explain why the setuptools/older version of typing extensions is being loaded, instead of the one from the Autosubmit module? A wild guess here.

[bdepaula@ bsceshub02 ~]$ cat /shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/lib/python3.9/site-packages/setuptools.pth 
/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/site-packages

@stamenminkov , thanks for looking into this issue.

How exactly do you evoke typing-extensions in that last module? And how are you defining that dependency?

It's a dependency defined in our setup.py file, https://earth.bsc.es/gitlab/es/autosubmit/-/blob/0f2f3896df68bd372ca74c57214a2f891a863098/setup.py#L42

We use it in some new code, where we simply from typing_extensions import List.....

We do have an updated typing-extensions/4.9.0-GCCcore-11.2.0 module, although I see there's no mention for it in the recipe, meaning that even if you may load it afterward, it still could fail if the build has been done against a different previous version of typing-extensions (I think included in the main Python module).

Good to know, but I think ideally we should be able to make it so that Autosubmit module uses the dependencies it is declaring in its project configuration :fingers_crossed: without relying on other modules (except Python).

A different thing, and not entirely related, I'm also curious about why are you skipping the "use_pip = True" and "sanity_pip_check = True" commands in the recipe, these most of the times secure a safe build.

Hmmm, this is a good point! Not sure though, so that will go to @dbeltrankyl :slight_smile:

Thanks!

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 9, 2024, 13:31

Thanks to both to looking at this

A different thing, and not entirely related, I'm also curious about why are you skipping the "use_pip = True" and "sanity_pip_check = True" commands in the recipe, these most of the times secure a safe build.

I tried to use_pip once because I had issues with some libraries, but in the end, it was solved by changing some stuff in our setup.py. I'm afraid I didn't investigate further.

To be honest, I inherited this recipe from Domingo/Kim when I arrived at the BSC and have used it forever; if there is any way of doing it with fewer issues, I'm open to changing it.

About the

#sanity_check_commands = [('autosubmit -v','')]

I've temporarily commented it so the module "works"; otherwise, the EB shows an "error," and the module won't be available. I did that so Bruno could perform a module load and debug it

It's a dependency defined in our setup.py file, https://earth.bsc.es/gitlab/es/autosubmit/-/blob/0f2f3896df68bd372ca74c57214a2f891a863098/setup.py#L42

In the last module loaded, I've changed that file locally so the dependency is forced, instead of having <=:

typing==3.7.4.3
typing_extensions==4.9.0

But unfortunately, it was still taking another version.

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @kinow on Oct 9, 2024, 13:44

Maybe we could try again now with "use_pip = True", and see if it produces an environment where our pip/setuptools version of typing_extensions is loaded instead of the one from Python?

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 9, 2024, 13:50

Just tried, now I remember why it is disabled

[dbeltran@ bsceshub02 ~]$ module load autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6
[dbeltran@ bsceshub02 ~]$ autosubmit -v
Traceback (most recent call last):
  File "/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/bin/autosubmit", line 31, in <module>
    from autosubmit.autosubmit import Autosubmit
  File "/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/lib/python3.9/site-packages/autosubmit/autosubmit.py", line 25, in <module>
    from bscearth.utils.date import date2str
ModuleNotFoundError: No module named 'bscearth.utils'

When it is set, it doesn't download any dependency, but maybe it does because I'm missing other stuff in the recipe.

Edit: Ah yes, when use_pip is true, I have to add each package manually and I would like to use the setup.py defined ones

Edit2: here:

dependencies = [
    (python, pyver),
    ('libpng','1.6.37'),
    ('typing..','4...'),
]

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @stamenminkov on Oct 10, 2024, 12:51

Hi @dbeltrankyl @kinow, I'm still digging into this, it is really not clear at all. Also I'm a bit confused by this type of internal installations as most of the times EB goes by either dependencies or extensions.

I've done a test installation and now going through the installations logs, although for now not finding anything out of order.

When I perform a module load autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6, pip is showing.

typing==3.7.4.3
typing_extensions==4.9.0

How do you obtain those @dbeltrankyl ? I'm not getting the same, for me it defers directly to typing_extensions==3.10.0.0 and all the rest of the packages from the main Python module (/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/site-packages)

It's strange. Looking at the PYTHONPATH values, it looks like Python should load the Autosubmit module you created, Dani, first.

[bdepaula@ bsceshub02 ~]$ python -c 'import sys; print(sys.path)'
['', '/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/lib/python3.9/site-packages', '/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/easybuild/python', '/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python39.zip', '/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9', '/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/lib-dynload', '/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/site-packages']

Indeed, but for some reason it's not loading at all the packages from the autosubmit path.

So these should be loaded, which looks correct. Then the setuptools.pth will load all the other packages. I am not sure what's the order that these files are loaded, but maybe that could explain why the setuptools/older version of typing extensions is being loaded, instead of the one from the Autosubmit module? A wild guess here.

I'm not sure if the order plays anything here, as even if setuptools.pth loaded the packages afterward, it would only superscribe the existing ones (like typing_extensions), however it doesn't seem to include any of the autosubmit ones - if I do pip list, freeze, etc. it doesn't show them at all.

Command examples
[smirosla@ bsceshub02 ~]$ ml load autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6-TEST
[smirosla@ bsceshub02 ~]$ ml list

Currently Loaded Modules:
  1) GCCcore/11.2.0
  2) zlib/1.2.11-GCCcore-11.2.0
  3) binutils/2.37-GCCcore-11.2.0
  4) GCC/11.2.0
  5) numactl/2.0.14-GCCcore-11.2.0
  6) XZ/5.2.5-GCCcore-11.2.0
  7) libxml2/2.9.10-GCCcore-11.2.0
  8) libpciaccess/0.16-GCCcore-11.2.0
  9) hwloc/2.5.0-GCCcore-11.2.0
 10) OpenSSL/1.1
 11) libevent/2.1.12-GCCcore-11.2.0
 12) UCX/1.11.2-GCCcore-11.2.0
 13) libfabric/1.13.2-GCCcore-11.2.0
 14) PMIx/4.1.0-GCCcore-11.2.0
 15) OpenMPI/4.1.1-GCC-11.2.0
 16) OpenBLAS/0.3.18-GCC-11.2.0
 17) FlexiBLAS/3.0.4-GCC-11.2.0
 18) gompi/2021b
 19) FFTW/3.3.10-gompi-2021b
 20) ScaLAPACK/2.1.0-gompi-2021b-fb
 21) foss/2021b
 22) bzip2/1.0.8-GCCcore-11.2.0
 23) ncurses/6.2-GCCcore-11.2.0
 24) libreadline/8.1-GCCcore-11.2.0
 25) Tcl/8.6.11-GCCcore-11.2.0
 26) SQLite/3.36-GCCcore-11.2.0
 27) GMP/6.2.1-GCCcore-11.2.0
 28) libffi/3.4.2-GCCcore-11.2.0
 29) Python/3.9.6-GCCcore-11.2.0
 30) libpng/1.6.37-GCCcore-11.2.0
 31) autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6-TEST

 

[smirosla@ bsceshub02 ~]$ pip list
Package                           Version
--------------------------------- ------------------
aiosignal                         1.3.1
alabaster                         0.7.12
appdirs                           1.4.4
asn1crypto                        1.4.0
atomicwrites                      1.4.0
attrs                             21.2.0
Babel                             2.9.1
backports.entry-points-selectable 1.1.0
backports.functools-lru-cache     1.6.4
bcrypt                            3.2.0
bitstring                         3.1.9
blist                             1.3.6
CacheControl                      0.12.11
cachy                             0.3.0
certifi                           2021.5.30
cffi                              1.14.6
chardet                           4.0.0
charset-normalizer                2.0.4
cleo                              1.0.0a5
click                             8.0.1
clikit                            0.6.2
colorama                          0.4.4
configobj                         5.0.8
configparser                      7.0.0
contourpy                         1.2.1
crashtest                         0.3.1
cryptography                      3.4.7
cycler                            0.12.1
Cython                            0.29.24
decorator                         5.0.9
distlib                           0.3.2
docopt                            0.6.2
docutils                          0.17.1
dulwich                           0.20.50
ecdsa                             0.17.0
exceptiongroup                    1.2.1
filelock                          3.0.12
flit                              3.3.0
flit_core                         3.3.0
fonttools                         4.53.0
frozenlist                        1.4.1
fsspec                            2021.7.0
future                            0.18.2
galaxy2cwl                        0.1.4
glob2                             0.7
gxformat2                         0.18.0
html5lib                          1.1
idna                              3.2
imagesize                         1.2.0
importlib-metadata                4.6.3
importlib-resources               5.2.2
iniconfig                         1.1.1
intervaltree                      3.1.0
intreehooks                       1.0
ipaddress                         1.0.23
isodate                           0.6.1
jeepney                           0.7.1
Jinja2                            3.0.1
joblib                            1.0.1
jsonschema                        4.17.0
keyring                           21.2.0
keyrings.alt                      4.1.0
kiwisolver                        1.4.5
liac-arff                         2.5.0
lockfile                          0.12.2
MarkupSafe                        2.0.1
matplotlib                        3.8.3
mistune                           3.0.2
mock                              4.0.3
more-itertools                    8.8.0
msgpack                           1.0.2
multidict                         6.0.5
mypy-extensions                   1.0.0
netaddr                           0.8.0
netifaces                         0.11.0
networkx                          2.6.3
nose                              1.3.7
numpy                             1.26.4
packaging                         20.9
paramiko                          2.7.2
pastel                            0.2.1
pathlib2                          2.3.6
paycheck                          1.0.2
pbr                               5.6.0
pexpect                           4.8.0
pillow                            10.3.0
pip                               21.2.2
pkginfo                           1.7.1
platformdirs                      2.5.2
pluggy                            0.13.1
poetry                            1.2.2
poetry-core                       1.3.2
poetry-plugin-export              1.2.0
portalocker                       2.7.0
psutil                            5.8.0
ptyprocess                        0.7.0
py                                1.10.0
py-expression-eval                0.3.13
py3dotplus                        1.1.0
pyasn1                            0.4.8
pycparser                         2.20
pycrypto                          2.6.1
Pygments                          2.9.0
pylev                             1.4.0
PyNaCl                            1.4.0
pyparsing                         3.1.1
pyrsistent                        0.18.0
pytest                            7.4.4
pytest-mock                       3.14.0
python-dateutil                   2.8.2
pytoml                            0.1.21
pytz                              2021.1
PyYAML                            6.0.1
rdflib                            7.0.0
regex                             2021.8.3
requests                          2.26.0
requests-toolbelt                 0.9.1
rocrate                           0.10.0
ruamel.yaml                       0.17.21
ruamel.yaml.clib                  0.2.8
scandir                           1.10.0
schema-salad                      8.5.20240503091721
SecretStorage                     3.3.1
semantic-version                  2.8.5
setproctitle                      1.3.3
setuptools                        65.5.1
setuptools-rust                   0.12.1
setuptools-scm                    6.0.1
shellingham                       1.5.0
simplegeneric                     0.8.1
simplejson                        3.17.3
six                               1.16.0
snowballstemmer                   2.1.0
sortedcontainers                  2.4.0
Sphinx                            4.1.2
sphinx-bootstrap-theme            0.7.1
sphinxcontrib-applehelp           1.0.2
sphinxcontrib-devhelp             1.0.2
sphinxcontrib-htmlhelp            2.0.0
sphinxcontrib-jsmath              1.0.1
sphinxcontrib-qthelp              1.0.3
sphinxcontrib-serializinghtml     1.1.5
sphinxcontrib-websupport          1.2.4
tabulate                          0.8.9
threadpoolctl                     2.2.0
tinydb                            4.8.0
toml                              0.10.2
tomli                             2.0.1
tomlkit                           0.11.6
tuspy                             1.0.3
typing                            3.7.4.3
typing-extensions                 3.10.0.0
ujson                             4.0.2
urllib3                           1.26.6
virtualenv                        20.7.0
wcwidth                           0.2.5
webencodings                      0.5.1
wheel                             0.36.2
xlib                              0.21
xlrd                              2.0.1
yarl                              1.9.4
zipfile36                         0.1.3
zipp                              3.5.0
WARNING: You are using pip version 21.2.2; however, version 24.2 is available.
You should consider upgrading via the '/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/bin/python3.9 -m pip install --upgrade pip' command.
[smirosla@ bsceshub02 ~]$ echo $PYTHONPATH
/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6-TEST/lib/python3.9/site-packages:/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/easybuild/python
[smirosla@ bsceshub02 ~]$ 

When it is set, it doesn't download any dependency, but maybe it does because I'm missing other stuff in the recipe.

Usually "use_pip = True" goes in combination with the option "sanity_pip_check = True", this way the module build will fail in the sanity_check step if it resolves that the library being installed doesn't account with all the necessary dependencies.

Edit: Ah yes, when use_pip is true, I have to add each package manually and I would like to use the setup.py defined ones

Yep, that's indeed true. In a PythonPackage type of easyconfig, all those would need to be listed as dependencies and as existing modules (or at least subdependencies or parts of those existing modules), which is true that could be too much of work.

There's an alternative though, by using a PythonBundle easyconfig, where dependencies are passed by as extensions and everything gets installed at once with the same recipe. It would still require though an update of the versions and checksums of the different libraries (if these need to change) for every different build of autosubmit.

I'm still pending to compare the build logs between using "use_pip = True" or not, will let you know if I find anything there.

Stamen

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 10, 2024, 13:08

Thanks for looking at it

I've done a test installation and now going through the installations logs, although for now not finding anything out of order.

If you copied the same .eb that I used the last time, I left the use_pip uncommented to test the use_pip option, so nothing was installed through Autosubmit's setup.py ( essentially, the module only installed autosubmit without any pip lib).

How do you obtain those @dbeltrankyl ? I'm not getting the same, for me it defers directly to typing_extensions==3.10.0.0 and all the rest of the packages from the main Python module (/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/site-packages)

I've rebuilt the package now without the use_pip option, so you should be able to see it with:

module load autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6
pip freeze or pip list
pip list output
[dbeltran@ bsceshub02 ~]$ pip list

Package                           Version
--------------------------------- ------------------
aiosignal                         1.3.1
alabaster                         0.7.12
appdirs                           1.4.4
asn1crypto                        1.4.0
atomicwrites                      1.4.0
attrs                             21.2.0
Babel                             2.9.1
backports.entry-points-selectable 1.1.0
backports.functools-lru-cache     1.6.4
bcrypt                            3.2.0
bitstring                         3.1.9
blist                             1.3.6
CacheControl                      0.12.11
cachy                             0.3.0
certifi                           2021.5.30
cffi                              1.14.6
chardet                           4.0.0
charset-normalizer                2.0.4
cleo                              1.0.0a5
click                             8.0.1
clikit                            0.6.2
colorama                          0.4.4
configobj                         5.0.8
configparser                      7.0.0
contourpy                         1.2.1
crashtest                         0.3.1
cryptography                      3.4.7
cycler                            0.12.1
Cython                            0.29.24
decorator                         5.0.9
distlib                           0.3.2
docopt                            0.6.2
docutils                          0.17.1
dulwich                           0.20.50
ecdsa                             0.17.0
exceptiongroup                    1.2.1
filelock                          3.0.12
flit                              3.3.0
flit_core                         3.3.0
fonttools                         4.53.0
frozenlist                        1.4.1
fsspec                            2021.7.0
future                            0.18.2
galaxy2cwl                        0.1.4
glob2                             0.7
gxformat2                         0.18.0
html5lib                          1.1
idna                              3.2
imagesize                         1.2.0
importlib-metadata                4.6.3
importlib-resources               5.2.2
iniconfig                         1.1.1
intervaltree                      3.1.0
intreehooks                       1.0
ipaddress                         1.0.23
isodate                           0.6.1
jeepney                           0.7.1
Jinja2                            3.0.1
joblib                            1.0.1
jsonschema                        4.17.0
keyring                           21.2.0
keyrings.alt                      4.1.0
kiwisolver                        1.4.5
liac-arff                         2.5.0
lockfile                          0.12.2
MarkupSafe                        2.0.1
matplotlib                        3.8.3
mistune                           3.0.2
mock                              4.0.3
more-itertools                    8.8.0
msgpack                           1.0.2
multidict                         6.0.5
mypy-extensions                   1.0.0
netaddr                           0.8.0
netifaces                         0.11.0
networkx                          2.6.3
nose                              1.3.7
numpy                             1.26.4
packaging                         20.9
paramiko                          2.7.2
pastel                            0.2.1
pathlib2                          2.3.6
paycheck                          1.0.2
pbr                               5.6.0
pexpect                           4.8.0
pillow                            10.3.0
pip                               21.2.2
pkginfo                           1.7.1
platformdirs                      2.5.2
pluggy                            0.13.1
poetry                            1.2.2
poetry-core                       1.3.2
poetry-plugin-export              1.2.0
portalocker                       2.7.0
psutil                            5.8.0
ptyprocess                        0.7.0
py                                1.10.0
py-expression-eval                0.3.13
py3dotplus                        1.1.0
pyasn1                            0.4.8
pycparser                         2.20
pycrypto                          2.6.1
Pygments                          2.9.0
pylev                             1.4.0
PyNaCl                            1.4.0
pyparsing                         3.1.1
pyrsistent                        0.18.0
pytest                            7.4.4
pytest-mock                       3.14.0
python-dateutil                   2.8.2
pytoml                            0.1.21
pytz                              2021.1
PyYAML                            6.0.1
rdflib                            7.0.0
regex                             2021.8.3
requests                          2.26.0
requests-toolbelt                 0.9.1
rocrate                           0.10.0
ruamel.yaml                       0.17.21
ruamel.yaml.clib                  0.2.8
scandir                           1.10.0
schema-salad                      8.5.20240503091721
SecretStorage                     3.3.1
semantic-version                  2.8.5
setproctitle                      1.3.3
setuptools                        65.5.1
setuptools-rust                   0.12.1
setuptools-scm                    6.0.1
shellingham                       1.5.0
simplegeneric                     0.8.1
simplejson                        3.17.3
six                               1.16.0
snowballstemmer                   2.1.0
sortedcontainers                  2.4.0
Sphinx                            4.1.2
sphinx-bootstrap-theme            0.7.1
sphinxcontrib-applehelp           1.0.2
sphinxcontrib-devhelp             1.0.2
sphinxcontrib-htmlhelp            2.0.0
sphinxcontrib-jsmath              1.0.1
sphinxcontrib-qthelp              1.0.3
sphinxcontrib-serializinghtml     1.1.5
sphinxcontrib-websupport          1.2.4
tabulate                          0.8.9
threadpoolctl                     2.2.0
tinydb                            4.8.0
toml                              0.10.2
tomli                             2.0.1
tomlkit                           0.11.6
tuspy                             1.0.3
typing                            3.7.4.3
typing_extensions                 4.9.0
ujson                             4.0.2
urllib3                           1.26.6
virtualenv                        20.7.0
wcwidth                           0.2.5
webencodings                      0.5.1
wheel                             0.36.2
xlib                              0.21
xlrd                              2.0.1
yarl                              1.9.4
zipfile36                         0.1.3
zipp                              3.5.0

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 10, 2024, 13:09

And the autosubmit -v output

[dbeltran@ bsceshub02 ~]$ autosubmit -v
Traceback (most recent call last):
  File "/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/bin/autosubmit", line 4, in <module>
    __import__('pkg_resources').run_script('autosubmit==4.1.10', 'autosubmit')
  File "/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/site-packages/pkg_resources/__init__.py", line 672, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1472, in run_script
    exec(code, namespace, namespace)
  File "/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/lib/python3.9/site-packages/autosubmit-4.1.10-py3.9.egg/EGG-INFO/scripts/autosubmit", line 31, in <module>
    from autosubmit.autosubmit import Autosubmit
  File "/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/lib/python3.9/site-packages/autosubmit-4.1.10-py3.9.egg/autosubmit/autosubmit.py", line 54, in <module>
    from .monitor.monitor import Monitor
  File "/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/lib/python3.9/site-packages/autosubmit-4.1.10-py3.9.egg/autosubmit/monitor/monitor.py", line 41, in <module>
    from autosubmit.monitor.diagram import create_stats_report
  File "/shared/earth/easybuild/rocky/8.4/x86_64/software/autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6/lib/python3.9/site-packages/autosubmit-4.1.10-py3.9.egg/autosubmit/monitor/diagram.py", line 39, in <module>
    from typing_extensions import LiteralString
ImportError: cannot import name 'LiteralString' from 'typing_extensions' (/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/site-packages/typing_extensions.py)

takes /shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/site-packages/typing_extensions.py

For some reason

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @stamenminkov on Oct 10, 2024, 15:54

Hi @dbeltrankyl,

If you copied the same .eb that I used the last time, I left the use_pip uncommented to test the use_pip option, so nothing was installed through Autosubmit's setup.py ( essentially, the module only installed autosubmit without any pip lib).

The tests I did were without the use_pip option (also to see what happens at the background), however pip list still shows the wrong set of libraries.

Just checked with the module you've most recently recompiled, and I'm getting the exact same as the other tests (typing_extensions==3.10.0.0, etc.), so again the wrong set. Checked as well with the eadmin account and the same.

😕 This is really confusing.

Is it possible that you might have anything in your /home, or .bashrc causing this? Perhaps also something conda-related? Can you check also for the eadmin account from your side?

Thanks!

Stamen

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 10, 2024, 16:24

Hello @stamenminkov ,

Just checked with the module you've most recently recompiled, and I'm getting the exact same as the other tests (typing_extensions==3.10.0.0, etc.), so again the wrong set. Checked as well with the eadmin account and the same.

Ok, sorry for that noise I wasn't getting it with eadmin and checking my files I saw that I had some .local packages which included the typing extensions, after removing it I'm getting the same list

[dbeltran@ bsceshub02 ~]$ module load autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6
[dbeltran@ bsceshub02 ~]$ pip list
Package                           Version
--------------------------------- ------------------
aiosignal                         1.3.1
alabaster                         0.7.12
appdirs                           1.4.4
asn1crypto                        1.4.0
atomicwrites                      1.4.0
attrs                             21.2.0
Babel                             2.9.1
backports.entry-points-selectable 1.1.0
backports.functools-lru-cache     1.6.4
bcrypt                            3.2.0
bitstring                         3.1.9
blist                             1.3.6
CacheControl                      0.12.11
cachy                             0.3.0
certifi                           2021.5.30
cffi                              1.14.6
chardet                           4.0.0
charset-normalizer                2.0.4
cleo                              1.0.0a5
click                             8.0.1
clikit                            0.6.2
colorama                          0.4.4
configobj                         5.0.8
configparser                      7.0.0
contourpy                         1.2.1
crashtest                         0.3.1
cryptography                      3.4.7
cycler                            0.12.1
Cython                            0.29.24
decorator                         5.0.9
distlib                           0.3.2
docopt                            0.6.2
docutils                          0.17.1
dulwich                           0.20.50
ecdsa                             0.17.0
exceptiongroup                    1.2.1
filelock                          3.0.12
flit                              3.3.0
flit_core                         3.3.0
fonttools                         4.53.0
frozenlist                        1.4.1
fsspec                            2021.7.0
future                            0.18.2
galaxy2cwl                        0.1.4
glob2                             0.7
gxformat2                         0.18.0
html5lib                          1.1
idna                              3.2
imagesize                         1.2.0
importlib-metadata                4.6.3
importlib-resources               5.2.2
iniconfig                         1.1.1
intervaltree                      3.1.0
intreehooks                       1.0
ipaddress                         1.0.23
isodate                           0.6.1
jeepney                           0.7.1
Jinja2                            3.0.1
joblib                            1.0.1
jsonschema                        4.17.0
keyring                           21.2.0
keyrings.alt                      4.1.0
kiwisolver                        1.4.5
liac-arff                         2.5.0
lockfile                          0.12.2
MarkupSafe                        2.0.1
matplotlib                        3.8.3
mistune                           3.0.2
mock                              4.0.3
more-itertools                    8.8.0
msgpack                           1.0.2
multidict                         6.0.5
mypy-extensions                   1.0.0
netaddr                           0.8.0
netifaces                         0.11.0
networkx                          2.6.3
nose                              1.3.7
numpy                             1.26.4
packaging                         20.9
paramiko                          2.7.2
pastel                            0.2.1
pathlib2                          2.3.6
paycheck                          1.0.2
pbr                               5.6.0
pexpect                           4.8.0
pillow                            10.3.0
pip                               21.2.2
pkginfo                           1.7.1
platformdirs                      2.5.2
pluggy                            0.13.1
poetry                            1.2.2
poetry-core                       1.3.2
poetry-plugin-export              1.2.0
portalocker                       2.7.0
psutil                            5.8.0
ptyprocess                        0.7.0
py                                1.10.0
py-expression-eval                0.3.13
py3dotplus                        1.1.0
pyasn1                            0.4.8
pycparser                         2.20
pycrypto                          2.6.1
Pygments                          2.9.0
pylev                             1.4.0
PyNaCl                            1.4.0
pyparsing                         3.1.1
pyrsistent                        0.18.0
pytest                            7.4.4
pytest-mock                       3.14.0
python-dateutil                   2.8.2
pytoml                            0.1.21
pytz                              2021.1
PyYAML                            6.0.1
rdflib                            7.0.0
regex                             2021.8.3
requests                          2.26.0
requests-toolbelt                 0.9.1
rocrate                           0.10.0
ruamel.yaml                       0.17.21
ruamel.yaml.clib                  0.2.8
scandir                           1.10.0
schema-salad                      8.5.20240503091721
SecretStorage                     3.3.1
semantic-version                  2.8.5
setproctitle                      1.3.3
setuptools                        65.5.1
setuptools-rust                   0.12.1
setuptools-scm                    6.0.1
shellingham                       1.5.0
simplegeneric                     0.8.1
simplejson                        3.17.3
six                               1.16.0
snowballstemmer                   2.1.0
sortedcontainers                  2.4.0
Sphinx                            4.1.2
sphinx-bootstrap-theme            0.7.1
sphinxcontrib-applehelp           1.0.2
sphinxcontrib-devhelp             1.0.2
sphinxcontrib-htmlhelp            2.0.0
sphinxcontrib-jsmath              1.0.1
sphinxcontrib-qthelp              1.0.3
sphinxcontrib-serializinghtml     1.1.5
sphinxcontrib-websupport          1.2.4
tabulate                          0.8.9
threadpoolctl                     2.2.0
tinydb                            4.8.0
toml                              0.10.2
tomli                             2.0.1
tomlkit                           0.11.6
tuspy                             1.0.3
typing                            3.7.4.3
typing-extensions                 3.10.0.0
ujson                             4.0.2
urllib3                           1.26.6
virtualenv                        20.7.0
wcwidth                           0.2.5
webencodings                      0.5.1
wheel                             0.36.2
xlib                              0.21
xlrd                              2.0.1
yarl                              1.9.4
zipfile36                         0.1.3
zipp                              3.5.0

This list shows autosubmit installed packages, so the setup.py was triggered.

However, it still doesn't explain why it is ignoring these settings:

'typing_extensions==4.9.0',
'typing==3.7.4.3',

Just to be sure that this change was in place...

I've checked the contents of the tar.gz

(base) [eadmin@ bsceshub02 easybuild-hub]$ tar -xzvf autosubmit-4.1.11.dev0-d6f0d798.tar.gz
(base) [eadmin@ bsceshub02 autosubmit-4.1.11.dev0-d6f0d798]$ cat setup.py 

#!/usr/bin/env python3

# Copyright 2014 Climate Forecasting Unit, IC3

# This file is part of Autosubmit.

# Autosubmit is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# Autosubmit is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with Autosubmit.  If not, see <http://www.gnu.org/licenses/>.

from os import path
from setuptools import setup
from setuptools import find_packages

here = path.abspath(path.dirname(__file__))

# Get the version number from the relevant file
with open(path.join(here, 'VERSION')) as f:
    version = f.read().strip()

install_requires = [
    'xlib==0.21',
    'setuptools<=68.2.2',
    'bscearth.utils<=0.5.2',
    'requests<=2.31.0',
    'networkx<=2.6.3',
    'portalocker<=2.7.0',
    'paramiko<=3.4',
    'pyparsing==3.1.1',
    'matplotlib<=3.8.3',
    'packaging<=23.2',
    'ruamel.yaml.clib<=0.2.8',
    'typing_extensions==4.9.0',
    'typing==3.7.4.3',
    'psutil<=5.6.1',
    'networkx<=2.6.3',
    'py3dotplus==1.1.0',
    'matplotlib<=3.8.3',
    'numpy<2',
    'ruamel.yaml==0.17.21',
    'rocrate==0.*',
    'autosubmitconfigparser==1.0.67',
    'configparser',
    'setproctitle',
    # 'sqlalchemy[mypy]' # TODO: pending Postgres MR
]

pg_require = [
    'psycopg2'
]

docs_require = [
    'livereload',
    'pydata-sphinx-theme==0.15.*',
    'sphinx==5.*',
    'sphinx-autobuild==2021.3.*',
    'sphinx_rtd_theme',
    'sphinx-reredirects==0.1.*'
]

tests_require = [
    'pytest==8.2.*',
    'pytest-cov',
    'pytest-mock',
    # 'testcontainers'  # TODO: pending Postgres MR
]

# You can add more groups, e.g. all_require = tests_require + graph_require, etc...
all_require = tests_require + pg_require

extras_require = {
    'postgres': pg_require,
    'tests': tests_require,
    'docs': docs_require,
    'all': all_require
}

setup(
    name='autosubmit',
    license='GNU GPL v3',
    platforms=['GNU/Linux Debian'],
    version=version,
    description='Autosubmit is a Python-based workflow manager to create, manage and monitor complex tasks involving different substeps, such as scientific computational experiments. These workflows may involve multiple computing systems for their completion, from HPCs to post-processing clusters or workstations. Autosubmit can orchestrate all the tasks integrating the workflow by managing their dependencies, interfacing with all the platforms involved, and handling eventual errors.',
    long_description=open('README_PIP.md').read(),
    author='Daniel Beltran Mora',
    author_email='daniel.beltran@ bsc.es',
    url='http://www.bsc.es/projects/earthscience/autosubmit/',
    download_url='https://earth.bsc.es/wiki/doku.php?id=tools:autosubmit',
    keywords=['climate', 'weather', 'workflow', 'HPC'],
    install_requires=install_requires,
    extras_require=extras_require,
    classifiers=[
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "License :: OSI Approved :: GNU General Public License (GPL)",
        "Operating System :: POSIX :: Linux",
    ],
    packages=find_packages(),
    include_package_data=True,
    package_data={'autosubmit': [
        'autosubmit/config/files/autosubmit.conf',
        'autosubmit/config/files/expdef.conf',
        'autosubmit/database/data/autosubmit.sql',
        'README',
        'CHANGELOG',
        'VERSION',
        'LICENSE',
        'docs/autosubmit.pdf'
    ]
    },
    scripts=['bin/autosubmit']
)

And the .eb used has

sources = ['%(name)s-%(version)s.tar.gz']
name = 'autosubmit'
version = '4.1.11.dev0-d6f0d798'

So it should force that version of the typing and ignore the one installed by the system, right?

Edit: Also, it doesn't explain why it is not working with .local packages so my confusion level is more or less the same as before

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 10, 2024, 16:27

Btw, the pip list command while using eadmin is much (much) slower than when I prompt it with my user not sure if you're aware or if it is expected

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @stamenminkov on Oct 11, 2024, 13:04

Hi @dbeltrankyl @kinow,

Btw, the pip list command while using eadmin is much (much) slower than when I prompt it with my user not sure if you're aware or if it is expected

I noticed as well 😕 could be the /home affecting on everything. For now let's see how this goes after @albertvilabsc and Operations solve the remaining issues with it and the hub is cleaned up.

This list shows autosubmit installed packages, so the setup.py was triggered.

Indeed, in the build log I can see the setyp.py being triggered as well and it shows installing all these packages, however for some reason it just "skips" that site-packages path. Causes could be something like this, although it's not clear.

I've also tested the build without the following line:

exts_filter = ('', "")

which brings back the sanity check for extensions, and then the build fails (for autosubmit library, but probably it would keep failing for others too), indicating that indeed there's something missing there and that the paths are not considered correctly.

So it should force that version of the typing and ignore the one installed by the system, right?

Yes, it should, but I suppose it's more about how the paths are treated, that additional site-packages being just ignored.


Anyway, bringing some news here: I've discussed that with the EB developers and they advise to avoid that type of building modules with EB, as it can visibly mess up the environment.

That's why I'll try and rewrite that recipe entirely and will turn it into a PythonBundle. Let's see if that fixes the issue :fingers_crossed_tone3: . If everything goes right, I'll explain later how to update that recipe for future releases.

Will let you know again soon!

Thanks, Stamen

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @kinow on Oct 11, 2024, 13:10

Thank you Stamen! If we get it working, then maybe we can use it to close this issue/MR https://earth.bsc.es/gitlab/es/autosubmit/-/issues/1394

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 11, 2024, 13:33

Thanks @stamenminkov !

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @ainagaya on Oct 14, 2024, 11:42

Hi @dbeltrankyl :) In the meantime, I wanted to test this locally in my laptop. This is what I did:

  • Activate my autosubmit venv
  • Check out the branch that you were working on
  • Do "pip install ."

Is this the right way to do it? I think it is my first time doing this and I'm not sure how I can check if I did it right or not (I can also wait but I wanted to do some progress this week in auto-phenomena).

Thanks!!

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 14, 2024, 11:54

Hello @ainagaya

Usually, I do it with pycharm, and it installs the packages automatically based on the current setup.py in a single venv

Without an ide I would do the same as you.

source venv/activate # don't remember the exact command
git clone -b GL-1426-filters-fix https://earth.bsc.es/gitlab/es/autosubmit.git
cd autosubmit_folder
pip install -e . # dev mode if you want to modify something

Then, if you have never used Autosubmit before on that machine, you have to perform:

autosubmit configure
autosubmit install

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 14, 2024, 11:58

Alternatively, instead of autosubmit configure, you can write this (change $your_user)

/etc/autosubmitrc

[database]
path = /home/$your_user/autosubmit
filename = autosubmit.db

[local]
path = /home/$your_user/autosubmit

[globallogs]
path = /home/$your_user/autosubmit/logs

[structures]
path = /home/$your_user/autosubmit/metadata/structures

[historicdb]
path = /home/$your_user/autosubmit/metadata/data

[historiclog]
path = /home/$your_user/autosubmit/metadata/logs

[config]
log_recovery_timeout = 120

And

mkdir -p /home/$your_user/autosubmit/metadata/logs
mkdir -p /home/$your_user/autosubmit/metadata/structures
mkdir -p /home/$your_user/autosubmit/metadata/data
autosubmit install

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @ainagaya on Oct 14, 2024, 12:59

Thanks Dani!! I think I configured everything fine (I did configure and install).

I'm a bit lost with the development (let me know if you prefer me to report somewhere else, but I think that it can be still something to fix in this MR, that's why I'm posting it here).

This is my joblist:

JOBS:
  DOWNLOAD_madrid_traffic:
    FILE: templates/download-traffic.sh,templates/downloads/madrid_traffic.yml
    PLATFORM: local
    FILE_TO_DOWNLOAD: madrid_traffic
    RUNNING: chunk
    DEPENDENCIES:
      DOWNLOAD_madrid_traffic:
        CHUNKS_FROM:
          "1":
            STATUS: "RUNNING"
            FROM_STEP: "1"
          "2":
            STATUS: "RUNNING"
            FROM_STEP: "2"

In the create step, I get this suspicious error:

Saving the jobs list...
/bin/sh: 1: sqlite3: not found

And when I try to run:

2024-10-14 12:56:27,841 Autosubmit is running with 4.1.10
2024-10-14 12:56:27,841 Preparing run
2024-10-14 12:56:27,842 
Checking configuration files...
2024-10-14 12:56:27,872 Expdef config file is correct
2024-10-14 12:56:27,872 Platforms sections: OK
2024-10-14 12:56:27,872 Jobs sections OK
2024-10-14 12:56:27,872 Autosubmit general sections OK
2024-10-14 12:56:27,872 Configuration files OK

2024-10-14 12:56:27,875 The Experiment name is: a002
2024-10-14 12:56:27,875 Sleep: 10
2024-10-14 12:56:27,875 Default retrials: 0
2024-10-14 12:56:27,875 Starting from job list restored from /home/agayayav/autosubmit/a002/pkl files
2024-10-14 12:56:27,894 Loading JobList
2024-10-14 12:56:27,952 Traceback (most recent call last):
  File "/home/agayayav/autosubmit/autosubmit/autosubmit.py", line 1980, in prepare_run
    job_list = Autosubmit.load_job_list(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/agayayav/autosubmit/autosubmit/autosubmit.py", line 5772, in load_job_list
    job_list.generate(as_conf, date_list, as_conf.get_member_list(), as_conf.get_num_chunks(), as_conf.get_chunk_ini(),
  File "/home/agayayav/autosubmit/autosubmit/job/job_list.py", line 250, in generate
    raise AutosubmitCritical("Autosubmit couldn't load the workflow graph. Please run autosubmit create first. If the pkl file exists and was generated with Autosubmit v4.1+, try again.",7013)
log.log.AutosubmitCritical:  

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/agayayav/autosubmit/autosubmit/autosubmit.py", line 2142, in run_experiment
    job_list, submitter , exp_history, host , as_conf, platforms_to_test, packages_persistence, _ = Autosubmit.prepare_run(expid, notransitive, start_time, start_after, run_only_members)
                                                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/agayayav/autosubmit/autosubmit/autosubmit.py", line 1986, in prepare_run
    raise AutosubmitCritical(
log.log.AutosubmitCritical:  

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/agayayav/autosubmit/bin/autosubmit", line 59, in main
    return_value = Autosubmit.parse_args()
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/agayayav/autosubmit/autosubmit/autosubmit.py", line 711, in parse_args
    return Autosubmit.run_experiment(args.expid, args.notransitive,args.start_time,args.start_after, args.run_only_members, args.profile)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/agayayav/autosubmit/autosubmit/autosubmit.py", line 2145, in run_experiment
    raise AutosubmitCritical(e.message, 7014, e.trace)
log.log.AutosubmitCritical:  

2024-10-14 12:56:27,952 Trace: Autosubmit couldn't load the workflow graph. Please run autosubmit create first. If the pkl file exists and was generated with Autosubmit v4.1+, try again.
[CRITICAL] 2024-10-14 12:56:27,952 Corrupted job_list, backup couldn't be restored [eCode=7014]
2024-10-14 12:56:27,952 More info at https://autosubmit.readthedocs.io/en/master/troubleshooting/error-codes.html

(I obviously tried again, also with the create -f, deleted the content of the pkl folder and started again)

(autosubmit) agayayav@ bsces108125:~/autosubmit/a002/pkl$ ll
total 28
drwxr-xr-x 2 agayayav agayayav  4096 Oct 14 12:55 ./
drwxr-xr-x 8 agayayav agayayav  4096 Oct 14 11:56 ../
-rw-rw-r-- 1 agayayav agayayav   362 Oct 14 12:55 job_list_a002.pkl
-rw-r--r-- 1 agayayav agayayav 16384 Oct 14 12:55 job_packages_a002.db

With a "normal" joblist autosubmit submits the jobs, that's why I think it is something in the joblist I posted above.

Let me know if you need some more information, the experiment is on my laptop but I guess that I can do the same steps and run it in the hub if needed (?).

Thanks a lot!

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 14, 2024, 13:34

Hello @ainagaya

I don't find any of these issues,

Saving the jobs list...
/bin/sh: 1: sqlite3: not found

Do you have sqlite3 installed? I thought it was already deployed on the machine.

Could you perform dot -v ?

(base) dbeltran@ bsces107894:~$ dot -v
dot - graphviz version 2.43.0 (0)

If it says 2.40, you need to update it.

A list of pre-requisites can be found in docs https://autosubmit.readthedocs.io/en/master/installation/index.html#

Pre-requisites: bash, python3, sqlite3, git-scm > 1.8.2, subversion, dialog, curl, python-tk(tkinter in centOS), graphviz >= 2.41, pip3, rsync

About your jobs.yml, I think you're missing one job. You're setting the download to depend upon himself( each chunk is depending on all the chunks of the section that is why it doesn't work well), which I think is a wrong approach unless I misunderstood something please correct me if not

I did an example the other day ( it is in the issue )

JOBS:
  DOWNLOAD_madrid_traffic:
    FILE: templates/download_traffic.sh,templates/downloads/madrid_traffic.yml
    PLATFORM: local
    FILE_TO_DOWNLOAD: madrid_traffic
    RUNNING: once
  DO_WORK:
    file: test.sh
    platform: local
    running: chunk
    dependencies:
      DOWNLOAD_madrid_traffic:
        status: "RUNNING"
        CHUNKS_FROM:
          "1":
            FROM_STEP: "1"
          "2":
            FROM_STEP: "2"
          "3":
            FROM_STEP: "3"
          "4":
            FROM_STEP: "4"

In this example, the download template will run just once, and its task is to download all the necessary stuff. Then another job will depend on a certain download checkpoint to begin to start

I can also deploy the module in the climate-dt meanwhile if it is better for you.

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @ainagaya on Oct 15, 2024, 15:42

added 2 commits

  • cc32f97 - Docs/jobs key in defining workflows
  • 9074911 - Merge branch 'docs/JOBS-key-in-defining-workflows' into 'GL-1426-filters-fix'

Compare with previous version

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @stamenminkov on Oct 16, 2024, 17:03

Hi @dbeltrankyl @kinow,

This whole week I'm attending a workshop, so I have limited time, nevertheless I'm working on updating the code!

I've however encountered some issues on the hub02, so hoping to get over these soon, I'll let you know when this advances!

Thanks, Stamen

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 17, 2024, 10:30

Thanks @stamenminkov !

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @stamenminkov on Oct 18, 2024, 17:10

Hi @dbeltrankyl @kinow ,

Glad to let you know that this is now sorted! 🎉 🎉 😃

It has taken me some time, as I've had to clean the environments in the hub (some pip and conda traces were affecting the installations, however these were additional issues ot the one we already had with typing-extensions), plus I've had to install also a few more packages as to resolve additional dependency conflicts. Good news is that this seems to be working properly now!

The modulename is the expected one:

autosubmit/4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6

And here's the new recipe:

autosubmit-4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6.eb
# AutoSubmit Python-Bundle Integration
# 
# Based on "autosubmit-dev-foss-2021b-Python-3.9.6.eb"
# Reviewed by Stamen Miroslavov (Barcelona Supercomputing Center), 2024

easyblock = 'PythonBundle'

name = 'autosubmit'
version = '4.1.11.dev0-d6f0d798'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://autosubmit.readthedocs.io/en/master/'
description = """Autosubmit is a lightweight workflow manager designed to meet climate research necessities. Unlike other workflow solutions in the domain, it integrates the capabilities of an experiment manager, workflow orchestrator and monitor in a self-contained application.

It is a Python package available at PyPI. The source code in Git contains a Dockerfile used in cloud environments with Kubernetes, and there are examples of how to install Autosubmit with Conda."""

toolchain = {'name': 'foss', 'version': '2021b'}

dependencies = [
    ('Python', '3.9.6'),
    ('python-xxhash','3.4.1', versionsuffix),
    ('bscearth.utils', '0.5.2', versionsuffix),
    ('networkx', '2.6.3', versionsuffix),
    ('tornado', '6.4', versionsuffix),
    ('coverage', '7.6.3', versionsuffix),
    ('BeautifulSoup', '4.11.1', versionsuffix),
    ('Pygments', '2.18.0', versionsuffix),
    ('libpng','1.6.37'),
    ('Graphviz', '2.50.0'),
    ('cryptography', '41.0.1', versionsuffix),
    ('setuptools', '64.0.3'),
    ('requests', '2.28.1', versionsuffix),
    ('paramiko', '3.4.0', versionsuffix),
    ('matplotlib', '3.8.2', versionsuffix),
    ('packaging', '21.3', versionsuffix),
    ('ruamel.yaml', '0.17.21', versionsuffix),
    ('autosubmitconfigparser', '1.0.67', versionsuffix),
    ('psycopg2', '2.9.9', versionsuffix),
    ('Sphinx','5.3.0', versionsuffix),
    ('Sphinx-RTD-Theme', '2.0.0', versionsuffix),
    ('rich', '13.8.1', versionsuffix),
    ('pytest', '8.2.2', versionsuffix),
    ('numpy', '1.23.3', versionsuffix),
    ('typing-extensions', '4.9.0'),
]

use_pip = True
sanity_pip_check = True
download_dep_fail = True

exts_list = [
    ('python-xlib', '0.33', {
        'modulename': 'Xlib',
        'checksums': ['55af7906a2c75ce6cb280a584776080602444f75815a7aff4d287bb2d7018b32'],
    }), 
    ('portalocker', '2.7.0', {
        'checksums': ['032e81d534a88ec1736d03f780ba073f047a06c478b06e2937486f334e955c51'],
    }),
    ('pyparsing', '3.1.1', {
        'checksums': ['ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db'],
    }),   
    ('psutil', '5.6.1', {
        'checksums': ['fa0a570e0a30b9dd618bffbece590ae15726b47f9f1eaf7518dfb35f4d7dcd21'],
    }),
    ('rocrate', '0.11.0', {
        'checksums': ['5fa4002446695e2a927ead02eee7be0ecf4e0089312d8127e51aa2175a25fa59'],
    }),
    ('setproctitle', '1.3.3', {
        'checksums': ['c913e151e7ea01567837ff037a23ca8740192880198b7fbb90b16d181607caae'],
    }),
    ('livereload', '2.7.0', {
        'checksums': ['f4ba199ef93248902841e298670eebfe1aa9e148e19b343bc57dbf1b74de0513'],
    }),
    ('nodeenv', '1.9.0', {
        'checksums': ['07f144e90dae547bf0d4ee8da0ee42664a42a04e02ed68e06324348dafe4bdb1'],
    }),
    ('accessible_pygments', '0.0.5', {
        'modulename': 'a11y_pygments',
        'sources': ['accessible_pygments-0.0.5.tar.gz'],
        'checksums': ['40918d3e6a2b619ad424cb91e556bd3bd8865443d9f22f1dcdf79e33c8046872'],
    }),
    ('sphinx-theme-builder', '0.2.0b2', {
        'checksums': ['e9cd98c2bb35bf414fe721469a043cdcc10f0808d1ffcf606acb4a6282a6f288'],
    }),
    ('pydata-sphinx-theme', '0.15.4', {
        'sources': ['pydata_sphinx_theme-0.15.4.tar.gz'],
        'checksums': ['7762ec0ac59df3acecf49fd2f889e1b4565dbce8b88b2e29ee06fdd90645a06d'],
    }),
    ('sphinx-autobuild', '2021.3.14', {
        'checksums': ['de1ca3b66e271d2b5b5140c35034c89e47f263f2cd5db302c9217065f7443f05'],
    }),    
    ('sphinx-reredirects', '0.1.2', {
        'sources': ['sphinx_reredirects-0.1.2.tar.gz'],
        'checksums': ['a0e7213304759b01edc22f032f1715a1c61176fc8f167164e7a52b9feec9ac64'],
    }),
    ('pytest-cov', '5.0.0', {
        'checksums': ['5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857'],
    }),
    ('pytest-mock', '3.14.0', {
        'checksums': ['2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0'],
    }),
    (name, version, {
        'sources': [{
            'filename': '%(name)s-%(version)s.tar.gz',
            'git_config': {
                'url': 'https://earth.bsc.es/gitlab/es',
                'repo_name': 'autosubmit',
                'commit': 'GL-1426-filters-fix',
                'recursive': True,
                'keep_git_dir': True,
            }
        }],
        'checksums': [None],
    }),
]

sanity_check_paths = {
    'files': ['bin/autosubmit'],
    'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

sanity_check_commands = [('autosubmit -v','')]

moduleclass = 'vis'

autosubmit-4.1.11.dev0-d6f0d798-foss-2021b-Python-3.9.6.eb

Please test this accordingly to see if all the autosubmit functions execute in the way they're expected to :pray_tone2:

In my case, autosubmit -v displays 4.1.10 which is correct (as it can be seen in the source code), however it takes quite a long time to execute the command (at least 6-7 seconds !! ).




So, here are a few important points I need to highlight regarding this new config file, especially in case you might require to update it somewhen in the future:

  1. PythonBundle specifics: this block demands the creation of extensions, which is just a different way of adding some dependencies. The way to understand the difference with the usual dependencies can be summarised like:

    • dependencies : usually these are more "fixed" version numbers and wouldn't change so often with new releases of the main program. Also, could be for larger packages with other plenty of dependencies, or also just packages widely used by many other modules.
    • extensions : most of the times either a way too specific library, or a version that might change easily with newer releases of the main program.

    That is, in this case updating the recipe for new autosubmit releases would mean some more work, as in some cases certain extensions might need a version change (including the checksums), however this build guarantees a correct and way safer environment than just letting EasyBuild decide what to include (which is also not recommended by EB staff). But don't worry, as most of the times that wouldn't be needed and you'll just need to recompile the new versions by just changing the part for autosubmit itself. Also, you would usually be familiar with the actual setup.py requirement changes, so this shall be an easy task.

  2. Sanity: it's important to have all the following sanity checks for the build, as this will ensure a correct installation:

    sanity_pip_check = True
    
    ...
    
    sanity_check_paths = {
    'files': ['bin/autosubmit'],
    'dirs': ['lib/python%(pyshortver)s/site-packages'],
    }
    
    sanity_check_commands = [('autosubmit -v','')]
    

    If anything is missing, or there's a version mismatch, etc., the build will break, showcasing the actual error, so this is a great way to find and to avoid potential bugs!!

  3. Autosubmit4-config-parser
    There's this pathlib clash for autosubmitconfigparser, where pathlib cannot be modularized (for all new Python, as it's already included inside the core), however it's explicitly demanded by the package:

    == FAILED: Installation ended unsuccessfully (build directory: /dev/shm/tmp/build/autosubmit/4.1.11.dev0-d6f0d798/foss-2021b-Python-3.9.6): build failed (first 300 chars): `/shared/earth/easybuild/rocky/8.4/x86_64/software/Python/3.9.6-GCCcore-11.2.0/bin/python -m pip check` failed:
    autosubmitconfigparser 1.0.67 requires pathlib, which is not installed.
    

    I've noticed that you've already corrected that for versions post-1.0.68, however, given that for autosubmit we have it enforced:

    'autosubmitconfigparser==1.0.67',
    

    I've had to create a patch to allow that usage (and I've also added autosubmitconfigparser-1.0.67 as a module for commodity.

    autosubmitconfigparser-1.0.67_fix-pathlib-dependence.patch

    autosubmitconfigparser-1.0.67-foss-2021b-Python-3.9.6.eb

  4. Git downloading: EasyBuild allows direct fetch from Git. The lines below are quite self-explanatory:

    'git_config': {
              'url': 'https://earth.bsc.es/gitlab/es',
              'repo_name': 'autosubmit',
              'commit': 'GL-1426-filters-fix',
              'recursive': True,
              'keep_git_dir': True,
          }
    

    Basically, you don't need a separate script for that, all can be done directly by this same recipe. In case you need to use again a tarball source, that can be switched easily, similar to the rest of the extensions in the list, by adding the checksums (and maybe specifying the source file if it has an irregular filename).

  5. Autosubmit requirements:
    Maybe it is not something important, however I've noticed that there are some repeated names in the requirements list:

    install_requires = [
        'xlib==0.21',
        'setuptools<=68.2.2',
        'bscearth.utils<=0.5.2',
        'requests<=2.31.0',
        'networkx<=2.6.3',
        'portalocker<=2.7.0',
        'paramiko<=3.4',
        'pyparsing==3.1.1',
        'matplotlib<=3.8.3',
        'packaging<=23.2',
        'ruamel.yaml.clib<=0.2.8',
        'typing_extensions<=4.9.0',
        'typing<=3.7.4.3',
        'psutil<=5.6.1',
        'networkx<=2.6.3',
        'py3dotplus==1.1.0',
        'matplotlib<=3.8.3',
        'numpy<2',
        'ruamel.yaml==0.17.21',
        'rocrate==0.*',
        'autosubmitconfigparser==1.0.67',
        'configparser',
        'setproctitle',
        # 'sqlalchemy[mypy]' # TODO: pending Postgres MR
    ]

    I'm not quite sure how are these defined in build time, however depending on the calls on each dependency, it could maybe introduce some errors, if we repeat a call (with other dependencies inside) it could superscribe some of the values maybe? This is just a guess, but you may want to look into it.




These are the main things for now, if you find anything else, please let me know!!

Thanks!

Cheers, Stamen

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 21, 2024, 09:59

Hello @stamenminkov!

Thanks!

In my case, autosubmit -v displays 4.1.10 which is correct (as it can be seen in the source code), however it takes quite a long time to execute the command (at least 6-7 seconds !! ).

Yep, that is too slow, but it always was the case in all installations in the hub

It takes

(base) dbeltran@ bsces107894:~$ time autosubmit -v
4.1.10

real	0m1.719s
user	0m1.910s
sys	0m1.033s

In my laptop

Autosubmit4-config-parser There's this pathlib clash for autosubmitconfigparser, where pathlib cannot be modularized (for all new Python, as it's already included inside the core), however it's explicitly demanded by the package:

Yes, thanks known issue!

I've had to create a patch to allow that usage (and I've also added autosubmitconfigparser-1.0.67 as a module for commodity.

autosubmitconfigparser-1.0.67_fix-pathlib-dependence.patch

autosubmitconfigparser-1.0.67-foss-2021b-Python-3.9.6.eb

Thanks, I'll use variations of this .eb to deploy newer autosubmitconfigparser versions ( it is required by the testing suite )

Git downloading: EasyBuild allows direct fetch from Git. The lines below are quite self-explanatory:

That seems more convenient, so to deploy official versions in the commit directive I just put a tag, no?

I'm not quite sure how are these defined in build time, however depending on the calls on each dependency, it could maybe introduce some errors, if we repeat a call (with other dependencies inside) it could superscribe some of the values maybe? This is just a guess, but you may want to look into it.

True, I did not notice it. I'll fix it, thanks!

The slowness affects all commands; I believe that the difference in the speed is in the process of importing all libraries; after that, the command is more or less as fast.

[dbeltran@ bsceshub02 ~]$ time autosubmit expid -dm -H "local" -d "test module"
Autosubmit is running with 4.1.10
The new experiment "a7vo" has been registered.
Generating folder structure...
Experiment folder: /esarchive/autosubmit/a7vo
Generating config files...
Experiment a7vo created

real	0m7.584s

In local:

(base) dbeltran@ bsces107894:~$ time autosubmit expid -dm -H "local" -d "test module"
Autosubmit is running with 4.1.10
The new experiment "a00m" has been registered.
Generating folder structure...
Experiment folder: /home/dbeltran/autosubmit_docs/a00m
Generating config files...
Experiment a00m created

real	0m1.800s

Other than that, the module works ok, thanks!

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 21, 2024, 10:01

Hello @ainagaya

In the end, I think you don't use the stuff added in this branch, no? (as_checkpoint)

If you tested it, did the developments in this branch work?

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @stamenminkov on Oct 21, 2024, 11:02

Hi @dbeltrankyl,

That's awesome, glad that it is working properly!!! :raised_hands_tone3: :raised_hands_tone3: :raised_hands_tone3:

Regarding the slowness, it makes sense in that case to be caused by the hub itself, hope this to be sorted really really soon with the hubs replication.

Thanks, I'll use variations of this .eb to deploy newer autosubmitconfigparser versions ( it is required by the testing suite )

Thanks! Please do use that recipe, however take into account that the patch is only for version 1.0.67, since this has been corrected in the newer versions (otherwise when applying the patch it would fail since it wouldn't find the same code lines in the source). For new installs just remove the few patch lines in that recipe, leaving one checksum line for the autosubmitconfigparser package itself (if it's doing the normal fetch) or set it to Git fetching, etc.

By the way, the default fetch for EB is first from the source directories on each machine and then via PyPI (for PythonPackage or PythonBundle recipes) if there isn't a match on the previous ones. Hence with a single checksums line this usually gets covered.

Also, if a new patch needs to be applied in the future, please let me know!

That seems more convenient, so to deploy official versions in the commit directive I just put a tag, no?

For tags you can directly substitute the 'commit' label to 'tag' :) You can find some more info here if necessary.

Thanks, Stamen

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @ainagaya on Oct 21, 2024, 11:13

Hi @dbeltrankyl , we used the as_checkpoint "writing", but not the dependency, since we only have the downloads part implemented and not the emissions part (that would be what depends on the downloads). I didn't test that branch in the end, but the writing part was already working.

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 21, 2024, 11:16

Thanks @ainagaya

The writing part is what this branch is testing, so I'll merge the branch

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 21, 2024, 11:17

Thanks!

I'll bookmark that website just in case

@kinow
Copy link
Member Author

kinow commented Dec 13, 2024

In GitLab by @dbeltrankyl on Oct 21, 2024, 11:18

mentioned in commit 56ffbf8

@kinow kinow closed this Dec 13, 2024
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.

3 participants