microsoft/qlib · error · NotImplementedError
This type of input is not supported
Error message
This type of input is not supported
What it means
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.
Source
Thrown at qlib/contrib/report/data/ana.py:35
import numpy as np
from qlib.contrib.report.data.base import FeaAnalyser
from qlib.contrib.report.utils import sub_fig_generator
from qlib.utils.paral import datetime_groupby_apply
from qlib.contrib.eva.alpha import pred_autocorr_all
from loguru import logger
import seaborn as sns
DT_COL_NAME = "datetime"
class CombFeaAna(FeaAnalyser):
"""
Combine the sub feature analysers and plot then in a single graph
"""
def __init__(self, dataset: pd.DataFrame, *fea_ana_cls):
if len(fea_ana_cls) <= 1:
raise NotImplementedError(f"This type of input is not supported")
self._fea_ana_l = [fcls(dataset) for fcls in fea_ana_cls]
super().__init__(dataset=dataset)
def skip(self, col):
return np.all(list(map(lambda fa: fa.skip(col), self._fea_ana_l)))
def calc_stat_values(self):
"""The statistics of features are finished in the underlying analysers"""
def plot_all(self, *args, **kwargs):
ax_gen = iter(sub_fig_generator(row_n=len(self._fea_ana_l), *args, **kwargs))
for col in self._dataset:
if not self.skip(col):
axes = next(ax_gen)
for fa, ax in zip(self._fea_ana_l, axes):
if not fa.skip(col):
fa.plot_single(col, ax)View on GitHub (pinned to 79633dd950)
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
Example fix
# before
comb = CombFeaAna(df, *[SciFeaAna])
# after
if len(analyser_classes) > 1:
comb = CombFeaAna(df, *analyser_classes)
else:
comb = analyser_classes[0](df) Defensive patterns
Strategy: validation
Validate before calling
analyser_classes = [A, B] assert len(analyser_classes) > 1, 'CombFeaAna needs >= 2 analyser classes' comb = CombFeaAna(df, *analyser_classes) if len(analyser_classes) > 1 else analyser_classes[0](df)
Try / catch
try:
comb = CombFeaAna(df, *classes)
except NotImplementedError:
comb = classes[0](df) # single analyser: use it directly Prevention
- 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
When it happens
Trigger: Instantiating CombFeaAna(df, SingleFeaAna) (only one analyser class) or CombFeaAna(df) (none). The check `len(fea_ana_cls) <= 1` fires in __init__.
Common situations: 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.
Related errors
- {freq} is not supported in NumpyQuote
- {method} is not supported
- benchmark freq can't be None!
- The benchmark {_codes} does not exist. Please provide the ri
- None in [trade_start_time, account_value, cash, return_rate,
AI-assisted analysis of microsoft/qlib@79633dd950 (2026-08-15).
Data as JSON: /api/errors/0d0a8e5c180d3bd8.
Report an issue: GitHub.