mirror of
https://github.com/microsoft/qlib.git
synced 2026-06-06 05:51:17 +08:00
fix ci error (#1921)
* fix ci error * fix ci error * add comments * add comments
This commit is contained in:
4
.github/workflows/test_qlib_from_pip.yml
vendored
4
.github/workflows/test_qlib_from_pip.yml
vendored
@@ -38,9 +38,13 @@ jobs:
|
||||
run: |
|
||||
python -m pip install pywinpty --only-binary=:all:
|
||||
|
||||
# # joblib was released on 2025-05-04 with version 1.5.0, in which _backend_args was removed and replaced by _backend_kwargs.
|
||||
# This change caused the application to fail, so the version of joblib is restricted here.
|
||||
# This restriction will be removed in the next release. The current qlib version is: 0.9.6
|
||||
- name: Qlib installation test
|
||||
run: |
|
||||
python -m pip install pyqlib
|
||||
python -m pip install "joblib<=1.4.2"
|
||||
|
||||
- name: Install Lightgbm for MacOS
|
||||
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-14' || matrix.os == 'macos-15' }}
|
||||
|
||||
@@ -6,6 +6,7 @@ from functools import partial
|
||||
from threading import Thread
|
||||
from typing import Callable, Text, Union
|
||||
|
||||
import joblib
|
||||
from joblib import Parallel, delayed
|
||||
from joblib._parallel_backends import MultiprocessingBackend
|
||||
import pandas as pd
|
||||
@@ -21,7 +22,12 @@ class ParallelExt(Parallel):
|
||||
maxtasksperchild = kwargs.pop("maxtasksperchild", None)
|
||||
super(ParallelExt, self).__init__(*args, **kwargs)
|
||||
if isinstance(self._backend, MultiprocessingBackend):
|
||||
self._backend_args["maxtasksperchild"] = maxtasksperchild
|
||||
# 2025-05-04 joblib released version 1.5.0, in which _backend_args was removed and replaced by _backend_kwargs.
|
||||
# Ref: https://github.com/joblib/joblib/pull/1525/files#diff-e4dff8042ce45b443faf49605b75a58df35b8c195978d4a57f4afa695b406bdc
|
||||
if joblib.__version__ < "1.5.0":
|
||||
self._backend_args["maxtasksperchild"] = maxtasksperchild # pylint: disable=E1101
|
||||
else:
|
||||
self._backend_kwargs["maxtasksperchild"] = maxtasksperchild # pylint: disable=E1101
|
||||
|
||||
|
||||
def datetime_groupby_apply(
|
||||
|
||||
Reference in New Issue
Block a user