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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user