Skip to content

[Bug] Unused code to store energy #2657

@VindeeR

Description

@VindeeR

Description

Might be related to #2418

As I was going through some tests, to complement and/or implement I found a test that led me to this piece of code, upon deeper analysis here's what I found.

At the function retrieve_times in the job_list Class, some of the statistics data is generated, and the variable that stores it is the job_data_collection I notice this function has only one call at autosubmit/autosubmir.py:2949, the energy attribute is never used in the autosubmit.py file, and the variable that is used to get the metrics is sent as None, another variable job_times is sent as None too which impacts a part of the code that comes later.

I found other places where the energy attribute is used, so it can't be assured with precision that this is where the energy issue is coming from but, it this seems to be related.

Another thing is despite being called job_data_collection I think it might be related to the SlurmMonitorItem Class, but I'm not too confident on that, since the attributes it tries to use are only found there.

Because of all that, there's about 45 lines of the code that is never touched.

I'm not sure which should be the proper behavior, but at the end of the day that piece of code should gather the statistics has not being used at least since 12/2021
autosubmit/job/job_list.py | retrieve_times | 3157-3192 (unused code)
autosubmit/job/job_list.py | retrieve_times | 3224-3234 (unused code)

Apparently this was the commit that changed&created this feature Implemented #644. A new module that handles statistics has been created (f7b27446)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions