{"record":{"id":"0d0a8e5c180d3bd8","repo":"microsoft/qlib","slug":"this-type-of-input-is-not-supported-0d0a8e","errorCode":null,"errorMessage":"This type of input is not supported","messagePattern":"This type of input is not supported","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"qlib/contrib/report/data/ana.py","lineNumber":35,"sourceCode":"import numpy as np\nfrom qlib.contrib.report.data.base import FeaAnalyser\nfrom qlib.contrib.report.utils import sub_fig_generator\nfrom qlib.utils.paral import datetime_groupby_apply\nfrom qlib.contrib.eva.alpha import pred_autocorr_all\nfrom loguru import logger\nimport seaborn as sns\n\nDT_COL_NAME = \"datetime\"\n\n\nclass CombFeaAna(FeaAnalyser):\n    \"\"\"\n    Combine the sub feature analysers and plot then in a single graph\n    \"\"\"\n\n    def __init__(self, dataset: pd.DataFrame, *fea_ana_cls):\n        if len(fea_ana_cls) <= 1:\n            raise NotImplementedError(f\"This type of input is not supported\")\n        self._fea_ana_l = [fcls(dataset) for fcls in fea_ana_cls]\n        super().__init__(dataset=dataset)\n\n    def skip(self, col):\n        return np.all(list(map(lambda fa: fa.skip(col), self._fea_ana_l)))\n\n    def calc_stat_values(self):\n        \"\"\"The statistics of features are finished in the underlying analysers\"\"\"\n\n    def plot_all(self, *args, **kwargs):\n        ax_gen = iter(sub_fig_generator(row_n=len(self._fea_ana_l), *args, **kwargs))\n\n        for col in self._dataset:\n            if not self.skip(col):\n                axes = next(ax_gen)\n                for fa, ax in zip(self._fea_ana_l, axes):\n                    if not fa.skip(col):\n                        fa.plot_single(col, ax)","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/contrib/report/data/ana.py#L17-L53","documentation":"CombFeaAna (qlib/contrib/report/data/ana.py) combines several feature analysers and plots them in one figure. It requires at least two analyser classes to combine; passing zero or one class makes combination meaningless, so the constructor raises NotImplementedError.","triggerScenarios":"Instantiating CombFeaAna(df, SingleFeaAna) (only one analyser class) or CombFeaAna(df) (none). The check `len(fea_ana_cls) <= 1` fires in __init__.","commonSituations":"Programmatically building a list of analysers from config and accidentally passing an empty or single-element list, e.g. CombFeaAna(df, *analyser_list) where analyser_list has one item.","solutions":["Pass at least two analyser classes: CombFeaAna(df, AnaA, AnaB)","If you only need one analyser, instantiate that analyser directly instead of CombFeaAna","When spreading a config-driven list, check its length before delegating to CombFeaAna"],"exampleFix":"# before\ncomb = CombFeaAna(df, *[SciFeaAna])\n\n# after\nif len(analyser_classes) > 1:\n    comb = CombFeaAna(df, *analyser_classes)\nelse:\n    comb = analyser_classes[0](df)","handlingStrategy":"validation","validationCode":"analyser_classes = [A, B]\nassert len(analyser_classes) > 1, 'CombFeaAna needs >= 2 analyser classes'\ncomb = CombFeaAna(df, *analyser_classes) if len(analyser_classes) > 1 else analyser_classes[0](df)","typeGuard":null,"tryCatchPattern":"try:\n    comb = CombFeaAna(df, *classes)\nexcept NotImplementedError:\n    comb = classes[0](df)  # single analyser: use it directly","preventionTips":["When spreading a config-driven analyser list, branch on its length before choosing CombFeaAna","CombFeaAna is only for combining; a single analyser should be instantiated directly"],"tags":["qlib","report","analysis","validation"],"backgroundTag":null,"analyzedSha":"79633dd9506ea689e5400dea0197717b5b3d74b7","analyzedAt":"2026-08-15T07:01:27.511Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}