MCPcopy
hub / github.com/microsoft/qlib / ParallelExt

Class ParallelExt

qlib/utils/paral.py:20–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19
20class ParallelExt(Parallel):
21 def __init__(self, *args, **kwargs):
22 maxtasksperchild = kwargs.pop("maxtasksperchild", None)
23 super(ParallelExt, self).__init__(*args, **kwargs)
24 if isinstance(self._backend, MultiprocessingBackend):
25 # 2025-05-04 joblib released version 1.5.0, in which _backend_args was removed and replaced by _backend_kwargs.
26 # Ref: https://github.com/joblib/joblib/pull/1525/files#diff-e4dff8042ce45b443faf49605b75a58df35b8c195978d4a57f4afa695b406bdc
27 if joblib.__version__ < "1.5.0":
28 self._backend_args["maxtasksperchild"] = maxtasksperchild # pylint: disable=E1101
29 else:
30 self._backend_kwargs["maxtasksperchild"] = maxtasksperchild # pylint: disable=E1101
31
32
33def datetime_groupby_apply(

Callers 3

datetime_groupby_applyFunction · 0.85
dataset_processorMethod · 0.85
multi_cache_walkerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected