{"record":{"id":"b28d6ac67d6a38ec","repo":"microsoft/qlib","slug":"type-process-is-not-supported-in-process-colle","errorCode":null,"errorMessage":"{type(process)} is not supported in `process_collect`.","messagePattern":"(.+?) is not supported in `process_collect`\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"qlib/workflow/task/collect.py","lineNumber":74,"sourceCode":"        For example, you can group and ensemble.\n\n        Args:\n            collected_dict (dict): the dict return by `collect`\n            process_list (list or Callable): the list of processors or the instance of a processor to process dict.\n                The processor order is the same as the list order.\n                For example: [Group1(..., Ensemble1()), Group2(..., Ensemble2())]\n\n        Returns:\n            dict: the dict after processing.\n        \"\"\"\n        if not isinstance(process_list, list):\n            process_list = [process_list]\n        result = {}\n        for artifact in collected_dict:\n            value = collected_dict[artifact]\n            for process in process_list:\n                if not callable(process):\n                    raise NotImplementedError(f\"{type(process)} is not supported in `process_collect`.\")\n                value = process(value, *args, **kwargs)\n            result[artifact] = value\n        return result\n\n    def __call__(self, *args, **kwargs) -> dict:\n        \"\"\"\n        Do the workflow including ``collect`` and ``process_collect``\n\n        Returns:\n            dict: the dict after collecting and processing.\n        \"\"\"\n        collected = self.collect()\n        return self.process_collect(collected, self.process_list, *args, **kwargs)\n\n\nclass MergeCollector(Collector):\n    \"\"\"\n    A collector to collect the results of other Collectors","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/workflow/task/collect.py#L56-L92","documentation":"Raised in ProcessCollector.process_collect when an element of process_list is not callable. Each entry is invoked as process(value, *args, **kwargs), so non-callable entries (strings, None, wrongly-instantiated objects) are rejected with NotImplementedError.","triggerScenarios":"Passing process_list containing a class name string instead of the class, passing None (e.g. an unset config value), or passing an already-called result instead of a function/callable object: ProcessCollector(..., process_list=[my_func]) where my_func is not callable.","commonSituations":"Config-driven workflows where the process step comes from YAML/JSON as a string and is never resolved to a callable; passing an Ensemble/Group instance that does not implement __call__; passing a dict of parameters instead of a processor object.","solutions":["Ensure every element of process_list is callable: pass function objects or instances implementing __call__ (qlib's Ensemble/Group classes are callable).","If the value comes from config, resolve it to a callable first (e.g. partial/init_instance_by_config) before building the ProcessCollector.","Validate process_list up front: `assert all(callable(p) for p in process_list)`.","Do not pass None or strings; remove empty entries from the list."],"exampleFix":"// before\ncollector = ProcessCollector(process_list=[\"ensemble\"], ...)\n\n// after\nfrom qlib.workflow.task.collect import Ensemble\ncollector = ProcessCollector(process_list=[Ensemble()], ...)","handlingStrategy":"type-guard","validationCode":"process_list = [p for p in process_list if p is not None]\nassert all(callable(p) for p in process_list), f\"non-callable process: {[p for p in process_list if not callable(p)]}\"","typeGuard":"def is_callable_process(p) -> bool:\n    return callable(p)","tryCatchPattern":null,"preventionTips":["Pass function/callable objects (e.g. Ensemble()) in process_list, never strings from config.","Resolve config strings to callables via init_instance_by_config before constructing ProcessCollector.","Unit-test collectors with a dummy callable to catch config regressions early."],"tags":["qlib","collector","callable","validation"],"backgroundTag":null,"analyzedSha":"79633dd9506ea689e5400dea0197717b5b3d74b7","analyzedAt":"2026-08-15T07:01:27.511Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}