microsoft/qlib · error · NotImplementedError
Please implement the 'get_index_data' method
Error message
Please implement the 'get_index_data' method
What it means
Error "Please implement the 'get_index_data' method" thrown in microsoft/qlib.
Source
Thrown at qlib/backtest/high_performance_ds.py:393
"""
raise NotImplementedError(f"Please implement the 'get_metric_series' method")
def get_index_data(self, metric: str) -> SingleData:
"""get one metric with the format of SingleData
Parameters
----------
metric : str
the metric name.
Return
------
IndexData.Series
one metric with the format of SingleData
"""
raise NotImplementedError(f"Please implement the 'get_index_data' method")
@staticmethod
def sum_all_indicators(
order_indicator: BaseOrderIndicator,
indicators: List[BaseOrderIndicator],
metrics: Union[str, List[str]],
fill_value: float = 0,
) -> None:
"""sum indicators with the same metrics.
and assign to the order_indicator(BaseOrderIndicator).
NOTE: indicators could be a empty list when orders in lower level all fail.
Parameters
----------
order_indicator : BaseOrderIndicator
the order indicator to assign.
indicators : List[BaseOrderIndicator]
the list of all inner indicators.View on GitHub (pinned to 79633dd950)
Solutions
- Implement the `get_index_data` method in your subclass before calling it.
- Use a concrete class that provides `get_index_data` instead of the abstract base.
When it happens
Trigger: This error is raised at qlib/backtest/high_performance_ds.py:393 when the guard condition fails: "Please implement the 'get_index_data' method". It triggers when the code path receives input or a state that violates the precondition checked at this point — e.g. an unimplemented abstract method being called, an unsupported argument type/value, or an invalid configuration. To avoid it, satisfy the documented precondition before this call: implement the required method in your subclass, or pass a supported value of the expected type as described by the message.
Common situations: See trigger scenarios.
AI-assisted analysis of microsoft/qlib@79633dd950 (2026-08-15).
Data as JSON: /api/errors/98b12671121a24ab.
Report an issue: GitHub.