microsoft/qlib · error · NotImplementedError

This type of input is not supported

Error message

This type of input is not supported

What it means

DataHandlerLP supports two process types: PTYPE_I ('independent', learn data processed independently from raw) and PTYPE_A ('append', learn processors appended on top of the infer output). Any other `process_type` value in the handler config reaches this NotImplementedError.

Source

Thrown at qlib/data/dataset/handler.py:603

        # data for inference
        # 1) assign
        _infer_df = _shared_df
        if not self._is_proc_readonly(self.infer_processors):  # avoid modifying the original data
            _infer_df = _infer_df.copy()
        # 2) process
        _infer_df = self._run_proc_l(_infer_df, self.infer_processors, with_fit=with_fit, check_for_infer=True)

        self._infer = _infer_df

        # data for learning
        # 1) assign
        if self.process_type == DataHandlerLP.PTYPE_I:
            _learn_df = _shared_df
        elif self.process_type == DataHandlerLP.PTYPE_A:
            # based on `infer_df` and append the processor
            _learn_df = _infer_df
        else:
            raise NotImplementedError(f"This type of input is not supported")
        if not self._is_proc_readonly(self.learn_processors):  # avoid modifying the original  data
            _learn_df = _learn_df.copy()
        # 2) process
        _learn_df = self._run_proc_l(_learn_df, self.learn_processors, with_fit=with_fit, check_for_infer=False)

        self._learn = _learn_df

        if self.drop_raw:
            del self._data

    def config(self, processor_kwargs: dict = None, **kwargs):
        """
        configuration of data.
        # what data to be loaded from data source

        This method will be used when loading pickled handler from dataset.
        The data will be initialized with different time range.

View on GitHub (pinned to 79633dd950)

Solutions

  1. Use the constants: `process_type: append` or `process_type: independent` (exact strings 'append' and 'independent').
  2. Prefer referencing `DataHandlerLP.PTYPE_A` / `DataHandlerLP.PTYPE_I` in Python configs.

Example fix

# before
data_handler_config = {'process_type': 'seq', ...}

# after
data_handler_config = {'process_type': DataHandlerLP.PTYPE_A, ...}  # 'append'
# or 'independent'
Defensive patterns

Strategy: validation

Validate before calling

from qlib.data.dataset.handler import DataHandlerLP

def valid_process_type(v) -> bool:
    return v in (DataHandlerLP.PTYPE_A, DataHandlerLP.PTYPE_I)

Type guard

from qlib.data.dataset.handler import DataHandlerLP

def is_valid_process_type(v: str) -> bool:
    return v in (DataHandlerLP.PTYPE_A, DataHandlerLP.PTYPE_I)

Prevention

When it happens

Trigger: Setting `process_type: 'i'`, `process_type: 0`, or a typo like `'append '` in data_handler_config; passing a string where the constants `DataHandlerLP.PTYPE_I`/`PTYPE_A` are expected.

Common situations: Hand-written YAML configs using lowercase/abbreviated values; configs migrated from other frameworks where a third mode existed.

Related errors


AI-assisted analysis of microsoft/qlib@79633dd950 (2026-08-15). Data as JSON: /api/errors/661097a4963b4c0f. Report an issue: GitHub.