{"record":{"id":"588084cc4e9e8e4d","repo":"microsoft/qlib","slug":"please-implement-the-list-recorders-method","errorCode":null,"errorMessage":"Please implement the `list_recorders` method.","messagePattern":"Please implement the `list_recorders` method\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"qlib/workflow/exp.py","lineNumber":240,"sourceCode":"        self, rtype: Literal[\"dict\", \"list\"] = RT_D, **flt_kwargs\r\n    ) -> Union[List[Recorder], Dict[str, Recorder]]:\r\n        \"\"\"\r\n        List all the existing recorders of this experiment. Please first get the experiment instance before calling this method.\r\n        If user want to use the method `R.list_recorders()`, please refer to the related API document in `QlibRecorder`.\r\n\r\n        flt_kwargs : dict\r\n            filter recorders by conditions\r\n            e.g.  list_recorders(status=Recorder.STATUS_FI)\r\n\r\n        Returns\r\n        -------\r\n        The return type depends on `rtype`\r\n            if `rtype` == \"dict\":\r\n                A dictionary (id -> recorder) of recorder information that being stored.\r\n            elif `rtype` == \"list\":\r\n                A list of Recorder.\r\n        \"\"\"\r\n        raise NotImplementedError(f\"Please implement the `list_recorders` method.\")\r\n\r\n\r\nclass MLflowExperiment(Experiment):\r\n    \"\"\"\r\n    Use mlflow to implement Experiment.\r\n    \"\"\"\r\n\r\n    def __init__(self, id, name, uri):\r\n        super(MLflowExperiment, self).__init__(id, name)\r\n        self._uri = uri\r\n        self._default_rec_name = \"mlflow_recorder\"\r\n        self._client = mlflow.tracking.MlflowClient(tracking_uri=self._uri)\r\n\r\n    def __repr__(self):\r\n        return \"{name}(id={id}, info={info})\".format(name=self.__class__.__name__, id=self.id, info=self.info)\r\n\r\n    def start(self, *, recorder_id=None, recorder_name=None, resume=False):\r\n        logger.info(f\"Experiment {self.id} starts running ...\")\r","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/workflow/exp.py#L222-L258","documentation":"Experiment.list_recorders(rtype, **flt_kwargs) is an abstract method that must return either a dict (id -> Recorder) or a list of Recorder objects, optionally filtered (e.g. status=Recorder.STATUS_FI). The base stub raises NotImplementedError; MLflowExperiment implements it by listing runs via MlflowClient with a 50000-record cap.","triggerScenarios":"exp.list_recorders() on a directly instantiated Experiment; R.list_recorders(exp_name) delegating to a custom Experiment subclass that never overrode list_recorders.","commonSituations":"Custom backends implementing only run creation; analysis notebooks enumerating finished recorders; migrations where the subclass was written against an older interface.","solutions":["Get the experiment from R.get_exp(...) so the MLflow implementation is used.","Implement list_recorders in your subclass honoring rtype ('dict'/'list') and status filters.","For large result sets, remember the MLflow implementation caps at UNLIMITED=50000 runs."],"exampleFix":"# before\nExperiment('1', 'e').list_recorders()  # NotImplementedError\n\n# after\nexp = R.get_exp(experiment_name='alpha158')\nrecs = exp.list_recorders(status=Recorder.STATUS_FI)  # dict of finished recorders","handlingStrategy":"type-guard","validationCode":"from qlib.workflow.exp import Experiment\nassert exp.__class__.list_recorders is not Experiment.list_recorders, 'listing unsupported'","typeGuard":"def listable(exp) -> bool:\n    from qlib.workflow.exp import Experiment\n    return exp.__class__.list_recorders is not Experiment.list_recorders","tryCatchPattern":null,"preventionTips":["Enumerate recorders via R.list_recorders with the default manager.","Remember MLflow-backed listing caps at 50000 runs."],"tags":["qlib","abstract-method","not-implemented","recorder","listing"],"backgroundTag":null,"analyzedSha":"79633dd9506ea689e5400dea0197717b5b3d74b7","analyzedAt":"2026-08-15T07:01:27.511Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}