{"record":{"id":"bc144f60619ecd75","repo":"microsoft/qlib","slug":"please-implement-the-get-metric-series-method","errorCode":null,"errorMessage":"Please implement the 'get_metric_series' method","messagePattern":"Please implement the 'get_metric_series' method","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"qlib/backtest/high_performance_ds.py","lineNumber":377,"sourceCode":"        else:\n            return tmp_metric\n\n    def get_metric_series(self, metric: str) -> pd.Series:\n        \"\"\"return the single metric with pd.Series format.\n\n        Parameters\n        ----------\n        metric : str\n            the metric name.\n\n        Return\n        ----------\n        pd.Series\n            the single metric.\n            If there is no metric name in the data, return pd.Series().\n        \"\"\"\n\n        raise NotImplementedError(f\"Please implement the 'get_metric_series' method\")\n\n    def get_index_data(self, metric: str) -> SingleData:\n        \"\"\"get one metric with the format of SingleData\n\n        Parameters\n        ----------\n        metric : str\n            the metric name.\n\n        Return\n        ------\n        IndexData.Series\n            one metric with the format of SingleData\n        \"\"\"\n\n        raise NotImplementedError(f\"Please implement the 'get_index_data' method\")\n\n    @staticmethod","sourceCodeStart":359,"sourceCodeEnd":395,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/backtest/high_performance_ds.py#L359-L395","documentation":"Error \"Please implement the 'get_metric_series' method\" thrown in microsoft/qlib.","triggerScenarios":"This error is raised at qlib/backtest/high_performance_ds.py:377 when the guard condition fails: \"Please implement the 'get_metric_series' 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.","commonSituations":"See trigger scenarios.","solutions":["Implement the `get_metric_series` method in your subclass before calling it.","Use a concrete class that provides `get_metric_series` instead of the abstract base."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"79633dd9506ea689e5400dea0197717b5b3d74b7","analyzedAt":"2026-08-15T07:01:27.511Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}