microsoft/qlib · error · NotImplementedError

This type of input is not supported

Error message

This type of input is not supported

What it means

MLflowExperiment.list_recorders returns dict (RT_D) or list (RT_L) depending on rtype; any other value hits the final branch raising NotImplementedError('This type of input is not supported'). It is an input-validation error for the rtype parameter, not a missing implementation.

Source

Thrown at qlib/workflow/exp.py:379

            mlflow supported filter string like 'params."my_param"="a" and tags."my_tag"="b"', use this will help to reduce too much run number.
        """
        runs = self._client.search_runs(
            self.id, run_view_type=ViewType.ACTIVE_ONLY, max_results=max_results, filter_string=filter_string
        )
        rids = []
        recorders = []
        for i, n in enumerate(runs):
            recorder = MLflowRecorder(self.id, self._uri, mlflow_run=n)
            if status is None or recorder.status == status:
                rids.append(n.info.run_id)
                recorders.append(recorder)

        if rtype == Experiment.RT_D:
            return dict(zip(rids, recorders))
        elif rtype == Experiment.RT_L:
            return recorders
        else:
            raise NotImplementedError(f"This type of input is not supported")

View on GitHub (pinned to 79633dd950)

Solutions

  1. Pass rtype='dict' (Experiment.RT_D, default) for id->recorder mapping or rtype='list' (Experiment.RT_L) for a list.
  2. Convert afterwards if you need another shape: pd.DataFrame([{ 'id': rid, **vars(r)} for rid, r in d.items()]).
  3. Validate rtype against the Literal['dict','list'] annotation before calling.

Example fix

# before
recs = exp.list_recorders(rtype='df')  # NotImplementedError

# after
recs = exp.list_recorders(rtype='dict')
df = pd.DataFrame([{'id': rid, 'name': r.name} for rid, r in recs.items()])
Defensive patterns

Strategy: validation

Validate before calling

from qlib.workflow.exp import Experiment
assert rtype in (Experiment.RT_D, Experiment.RT_L), f"rtype must be 'dict' or 'list', got {rtype!r}"
recs = exp.list_recorders(rtype=rtype)

Type guard

def valid_rtype(rtype: str) -> bool:
    return isinstance(rtype, str) and rtype in ('dict', 'list')

Prevention

When it happens

Trigger: exp.list_recorders(rtype='df') or rtype='DataFrame'; passing rtype as a variable that is None; typos like 'Dict' or 'LIST'.

Common situations: Expecting a pandas DataFrame return (common assumption from search_records) and passing rtype='df'; forwarding an unvalidated rtype from CLI/config into list_recorders.

Related errors


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