mirror of
https://github.com/microsoft/qlib.git
synced 2026-06-06 05:51:17 +08:00
Update handler
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
# Licensed under the MIT License.
|
||||
|
||||
from ...data.dataset.handler import DataHandlerLP
|
||||
from ...data.dataset.processor import Processor, MinMaxNorm, ZscoreNorm
|
||||
from ...utils import get_cls_kwargs, get_module_by_module_path
|
||||
from ...data.dataset.processor import Processor
|
||||
from ...utils import get_cls_kwargs
|
||||
from ...data.dataset import processor as processor_module
|
||||
from ...log import TimeInspector
|
||||
from inspect import isclass
|
||||
from inspect import getfullargspec
|
||||
import copy
|
||||
|
||||
|
||||
@@ -100,11 +100,11 @@ class Alpha158(DataHandlerLP):
|
||||
for p in proc_l:
|
||||
if not isinstance(p, Processor):
|
||||
klass, pkwargs = get_cls_kwargs(p, processor_module)
|
||||
processors = get_module_by_module_path(processor_module.__name__)
|
||||
if klass.__name__ in [c for c in dir(processor_module) if isclass(getattr(processor_module, c))]:
|
||||
args = getfullargspec(klass).args
|
||||
if "fit_start_time" in args and "fit_end_time" in args:
|
||||
assert (
|
||||
fit_start_time is not None and fit_end_time is not None
|
||||
), "Make sure fit_start_time and fit_end_time are not None."
|
||||
), "Make sure `fit_start_time` and `fit_end_time` are not None."
|
||||
pkwargs.update(
|
||||
{
|
||||
"fit_start_time": fit_start_time,
|
||||
|
||||
Reference in New Issue
Block a user