1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-10 06:20:57 +08:00

fix data provider init bug

This commit is contained in:
Young
2020-11-02 09:42:07 +00:00
parent 371da2a74c
commit 8a0135d79a
6 changed files with 11 additions and 18 deletions

View File

@@ -195,7 +195,7 @@ def get_cls_kwargs(config: Union[dict, str], module) -> (type, dict):
def init_instance_by_config(
config: Union[str, dict], module=None, accept_types: Union[type, Tuple[type]] = tuple([])
config: Union[str, dict], module=None, accept_types: Union[type, Tuple[type]] = tuple([]), **kwargs
) -> object:
"""
get initialized instance with config
@@ -229,8 +229,8 @@ def init_instance_by_config(
if module is None:
module = get_module_by_module_path(config["module_path"])
klass, kwargs = get_cls_kwargs(config, module)
return klass(**kwargs)
klass, cls_kwargs = get_cls_kwargs(config, module)
return klass(**cls_kwargs, **kwargs)
def compare_dict_value(src_data: dict, dst_data: dict):