qlib icon indicating copy to clipboard operation
qlib copied to clipboard

TypeError in LocalDatasetProvider.dataset (multiple values for inst_processors) & AttributeError in ParallelExt on Colab

Open WeiCANADA opened this issue 6 months ago • 1 comments

Description:

When running a standard Qlib workflow (e.g., examples/workflow_by_code.ipynb or examples/workflow_by_code.py) in a Colab environment, a TypeError occurs in LocalDatasetProvider.dataset, followed by an AttributeError in ParallelExt during exception handling. This prevents the workflow from completing.

Environment:

Qlib Version: 0.9.6 Python Version: 3.11 ( OS: Google Colab (Linux) Joblib Version: 1.5.1

TypeError Traceback (most recent call last)/usr/local/lib/python3.11/dist-packages/qlib/data/data.py in features(self, instruments, fields, start_time, end_time, freq, disk_cache, inst_processors) 1185 try:-> 1186 return DatasetD.dataset( 1187 instruments, fields, start_time, end_time, freq, disk_cache, inst_processors=inst_processorsTypeError: LocalDatasetProvider.dataset() got multiple values for argument 'inst_processors'During handling of the above exception, another exception occurred:AttributeError Traceback (most recent call last) 15 frames /usr/local/lib/python3.11/dist-packages/qlib/utils/paral.py in init(self, *args, **kwargs) 22 super(ParallelExt, self).init(*args, **kwargs) 23 if isinstance(self._backend, MultiprocessingBackend):---> 24 self._backend_args["maxtasksperchild"] = maxtasksperchild 25 26 AttributeError: 'ParallelExt' object has no attribute '_backend_args'

WeiCANADA avatar Jun 05 '25 14:06 WeiCANADA

I solved this issue by downgrading joblib using the command pip install joblib==1.2.0, but this incompatibility must be solved.

arplusman avatar Jun 08 '25 10:06 arplusman

I solved this issue by downgrading joblib using the command pip install joblib==1.2.0, but this incompatibility must be solved.

thanks, it really works.

majieforest avatar Jul 22 '25 13:07 majieforest

Hi, @WeiCANADA Thank you for your interest in qlib. This issue has been fixed, please install the latest version of qlib or pull the latest main branch code and retry.

SunsetWolf avatar Sep 05 '25 13:09 SunsetWolf