mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-12 15:26:54 +08:00
fix typo, staticmethod etc. (#1402)
* config.py: fix typo; static method * fix typo in qlib/utils/paral * 1) limit numpy version as numba support for 1.24+ has not been released; 2) no need to use custom numba version for pytest. * remove useless argument Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
This commit is contained in:
@@ -24,7 +24,7 @@ class ParallelExt(Parallel):
|
||||
|
||||
|
||||
def datetime_groupby_apply(
|
||||
df, apply_func: Union[Callable, Text], axis=0, level="datetime", resample_rule="M", n_jobs=-1, skip_group=False
|
||||
df, apply_func: Union[Callable, Text], axis=0, level="datetime", resample_rule="M", n_jobs=-1
|
||||
):
|
||||
"""datetime_groupby_apply
|
||||
This function will apply the `apply_func` on the datetime level index.
|
||||
@@ -116,7 +116,7 @@ class AsyncCaller:
|
||||
# The code are for implementing following workflow
|
||||
# - Construct complex data structure nested with delayed joblib tasks
|
||||
# - For example, {"job": [<delayed_joblib_task>, {"1": <delayed_joblib_task>}]}
|
||||
# - executing all the tasks and replace all the <deplayed_joblib_task> with its return value
|
||||
# - executing all the tasks and replace all the <delayed_joblib_task> with its return value
|
||||
|
||||
# This will make it easier to convert some existing code to a parallel one
|
||||
|
||||
@@ -160,7 +160,7 @@ class DelayedDict(DelayedTask):
|
||||
It is designed for following feature:
|
||||
Converting following existing code to parallel
|
||||
- constructing a dict
|
||||
- key can be get instantly
|
||||
- key can be gotten instantly
|
||||
- computation of values tasks a lot of time.
|
||||
- AND ALL the values are calculated in a SINGLE function
|
||||
"""
|
||||
@@ -280,7 +280,7 @@ def complex_parallel(paral: Parallel, complex_iter):
|
||||
|
||||
class call_in_subproc:
|
||||
"""
|
||||
When we repeating run functions, it is hard to avoid memory leakage.
|
||||
When we repeatedly run functions, it is hard to avoid memory leakage.
|
||||
So we run it in the subprocess to ensure it is OK.
|
||||
|
||||
NOTE: Because local object can't be pickled. So we can't implement it via closure.
|
||||
|
||||
Reference in New Issue
Block a user