{"record":{"id":"4cb2242f5614ae35","repo":"microsoft/qlib","slug":"unknown-parameter-k","errorCode":null,"errorMessage":"Unknown parameter: {k}","messagePattern":"Unknown parameter: (.+?)","errorType":"exception","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"qlib/utils/serial.py","lineNumber":105,"sourceCode":"        kwargs may include following keys\n\n            dump_all : bool\n                will the object dump all object\n            exclude : list\n                What attribute will not be dumped\n            include : list\n                What attribute will be dumped\n\n        recursive : bool\n            will the configuration be recursive\n        \"\"\"\n        keys = {\"dump_all\", \"exclude\", \"include\"}\n        for k, v in kwargs.items():\n            if k in keys:\n                attr_name = f\"_{k}\"\n                setattr(self, attr_name, v)\n            else:\n                raise KeyError(f\"Unknown parameter: {k}\")\n\n        if recursive:\n            for obj in self.__dict__.values():\n                # set flag to prevent endless loop\n                self.__dict__[self.FLAG_KEY] = True\n                if isinstance(obj, Serializable) and self.FLAG_KEY not in obj.__dict__:\n                    obj.config(recursive=True, **kwargs)\n                del self.__dict__[self.FLAG_KEY]\n\n    def to_pickle(self, path: Union[Path, str], **kwargs):\n        \"\"\"\n        Dump self to a pickle file.\n\n        path (Union[Path, str]): the path to dump\n\n        kwargs may include following keys\n\n            dump_all : bool","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/utils/serial.py#L87-L123","documentation":"Error \"Unknown parameter: {k}\" thrown in microsoft/qlib.","triggerScenarios":"This error is raised at qlib/utils/serial.py:105 when the guard condition fails: \"Unknown parameter: {k}\". 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":["Remove the unknown parameter from the call/config; only declared serializable fields are accepted.","Check the parameter name for typos against the class definition."],"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-15T17:31:12.345Z"}