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

Don't split tasks in the modules #970

Open
rvhonorato opened this issue Aug 8, 2024 · 1 comment
Open

Don't split tasks in the modules #970

rvhonorato opened this issue Aug 8, 2024 · 1 comment
Assignees
Labels
enhancement Enhancing an existing feature of adding a new one execution Related to execution modes, such as GRID, HPC, local, etc.

Comments

@rvhonorato
Copy link
Member

rvhonorato commented Aug 8, 2024

Desired feature/enhancement

Refactor code that is splitting tasks in the modules

Motivation

libparallel recieves a set of tasks and handles the split and balancing of them, however this is also being done elsewhere in the code.




for core in range(ncores):



Related implementations that generate multiple files relying on the task split to retrieve information;

Description

For maintanability, consistency and simplicity this should be handled in a single library.

Additional context

Would be good if we could make this clear into some developer manual

@rvhonorato rvhonorato added the enhancement Enhancing an existing feature of adding a new one label Aug 8, 2024
@rvhonorato rvhonorato mentioned this issue Aug 8, 2024
12 tasks
@rvhonorato rvhonorato self-assigned this Aug 8, 2024
@rvhonorato rvhonorato added the execution Related to execution modes, such as GRID, HPC, local, etc. label Aug 8, 2024
@rvhonorato
Copy link
Member Author

I see now that the execution mode is analysis modules is being overwritten (#928 (comment)). This makes this issue much simpler to be resolved, as we can simply set is as local and use the same pattern applied here:

return copy.deepcopy(self)

def extract_data_from_capri_class(
capri_objects: list[CAPRI],
sort_key: str,
sort_ascending: bool,
output_fname: Path,
) -> Union[dict[int, ParamDict], None]:
"""
Extracts data attributes from a list of CAPRI objects into a structured dictionary,
optionally sorts the data based on a specified key, and writes the sorted data to
a file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancing an existing feature of adding a new one execution Related to execution modes, such as GRID, HPC, local, etc.
Projects
None yet
Development

No branches or pull requests

1 participant