deepmol.parallelism package

Submodules

deepmol.parallelism.multiprocessing module

class JoblibMultiprocessing(n_jobs: int = -1, process: callable | None = None)[source]

Bases: MultiprocessingClass

Multiprocessing class using joblib.

run(items: Iterable) Iterable[source]

Runs the multiprocessing.

Parameters:

items (Iterable) – The items to use for multiprocessing.

Returns:

results – The results of the multiprocessing.

Return type:

Iterable

class MultiprocessingClass(n_jobs: int = -1, process: callable | None = None)[source]

Bases: ABC

Base class for multiprocessing.

property process

Returns the function to use for multiprocessing.

abstract run(items: Iterable) Iterable[source]

Runs the multiprocessing.

Parameters:

items (Iterable) – The items to use for multiprocessing.

Returns:

results – The results of the multiprocessing.

Return type:

Iterable

run_iteratively(items: list)[source]

Does not run multiprocessing due to an error pickling the process function or other.

Module contents