{"record":{"id":"dc0fa80a4fb38824","repo":"microsoft/qlib","slug":"this-type-of-input-is-not-supported-dc0fa8","errorCode":null,"errorMessage":"This type of input is not supported","messagePattern":"This type of input is not supported","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"qlib/contrib/meta/data_selection/dataset.py","lineNumber":229,"sourceCode":"                        f\"fill_method={self.fill_method}; the info after can't be correctly parsed. Please check your parameters.\"\n                    )\n                fill_value = meta_info_norm.max(axis=1)\n                # fill it with row max to align with previous implementation\n                # This will magnify the data similarity when data is in daily freq\n\n                # the fill value corresponds to data like this\n                # It get a performance value for each day.\n                # The performance value are get from other models on this day\n                # 2009-01-16    0.276320\n                # 2009-01-19    0.280603\n                #                 ...\n                # 2011-06-27    0.203773\n                meta_info_norm = meta_info_norm.T.fillna(fill_value).T\n        elif self.fill_method == \"zero\":\n            # It will fillna(0.0) at the end.\n            pass\n        else:\n            raise NotImplementedError(f\"This type of input is not supported\")\n        meta_info_norm = meta_info_norm.fillna(0.0)  # always fill zero in case of NaN\n        return meta_info_norm\n\n    def get_meta_input(self):\n        return self.processed_meta_input\n\n\nclass MetaDatasetDS(MetaTaskDataset):\n    def __init__(\n        self,\n        *,\n        task_tpl: Union[dict, list],\n        step: int,\n        trunc_days: int = None,\n        rolling_ext_days: int = 0,\n        exp_name: Union[str, InternalData],\n        segments: Union[Dict[Text, Tuple], float, str],\n        hist_step_n: int = 10,","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/contrib/meta/data_selection/dataset.py#L211-L247","documentation":"MetaTaskDS.get_meta_info/processing supports only specific fill_method values for handling NaN in the meta input matrix (a 'forward'-style interpolation branch and a 'zero' branch). Any other fill_method string reaches the else and raises NotImplementedError.","triggerScenarios":"Constructing MetaTaskDS(fill_method='mean') or any value other than the two supported ones; the constructor does not validate fill_method, so the failure is deferred to data processing time.","commonSituations":"Assuming pandas fillna method names ('ffill', 'bfill', 'mean') work here; copying a fill_method from other qlib components into the meta data-selection pipeline.","solutions":["Read the class source/docstring for the exact accepted fill_method values (the forward-fill branch and 'zero') and use one of them.","Use fill_method='zero' if you want NaNs simply replaced by 0.0 after normalization.","Pre-clean your data so the meta matrix has no NaNs, making fill_method irrelevant."],"exampleFix":"// before\nmds = MetaTaskDS(..., fill_method=\"ffill\")\n\n// after\nmds = MetaTaskDS(..., fill_method=\"zero\")","handlingStrategy":"validation","validationCode":"if fill_method not in (\"forward\", \"zero\"):  # check class source for exact set\n    fill_method = \"zero\"\nMetaTaskDS(..., fill_method=fill_method)","typeGuard":"def is_valid_fill_method(m) -> bool:\n    return m in (\"forward\", \"zero\")","tryCatchPattern":"try:\n    mtds = MetaTaskDS(..., fill_method=fill_method)\n    mtds.prepare(\"train\")\nexcept NotImplementedError as e:\n    if \"not supported\" in str(e):\n        mtds = MetaTaskDS(..., fill_method=\"zero\")\n    else:\n        raise","preventionTips":["Read MetaTaskDS's accepted fill_method values from source before configuring.","Prefer 'zero' for a deterministic, easily-reasoned-about fill.","Validate enum-like config values once at config load."],"tags":["qlib","meta-learning","data-selection","config"],"backgroundTag":null,"analyzedSha":"79633dd9506ea689e5400dea0197717b5b3d74b7","analyzedAt":"2026-08-15T07:01:27.511Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}