1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-07 04:50:56 +08:00

add handler pickle attr, enhance init_instance_by_config

This commit is contained in:
Young
2021-10-26 23:32:33 +08:00
parent c6bb11fe56
commit 5fa56703ae
3 changed files with 18 additions and 5 deletions

View File

@@ -644,6 +644,12 @@ class DataHandlerLP(DataHandler):
new_hd: DataHandlerLP = object.__new__(DataHandlerLP)
new_hd.from_cast = True # add a mark for the casted instance
for key in list(DataHandlerLP.ATTR_MAP.values()) + ["instruments", "start_time", "end_time", "fetch_orig"]:
for key in list(DataHandlerLP.ATTR_MAP.values()) + [
"instruments",
"start_time",
"end_time",
"fetch_orig",
"drop_raw",
]:
setattr(new_hd, key, getattr(handler, key, None))
return new_hd