mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-17 17:34:35 +08:00
format code
This commit is contained in:
@@ -103,6 +103,7 @@ class AverageEnsemble(Ensemble):
|
|||||||
Returns:
|
Returns:
|
||||||
pd.DataFrame: the complete result of averaging and standardizing.
|
pd.DataFrame: the complete result of averaging and standardizing.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __call__(self, ensemble_dict: dict) -> pd.DataFrame:
|
def __call__(self, ensemble_dict: dict) -> pd.DataFrame:
|
||||||
# need to flatten the nested dict
|
# need to flatten the nested dict
|
||||||
ensemble_dict = flatten_dict(ensemble_dict, sep=FLATTEN_TUPLE)
|
ensemble_dict = flatten_dict(ensemble_dict, sep=FLATTEN_TUPLE)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class Group:
|
|||||||
else:
|
else:
|
||||||
raise NotImplementedError(f"Please specify valid `_ens_func`.")
|
raise NotImplementedError(f"Please specify valid `_ens_func`.")
|
||||||
|
|
||||||
def __call__(self, ungrouped_dict: dict, n_jobs:int=1, verbose:int=0, *args, **kwargs) -> dict:
|
def __call__(self, ungrouped_dict: dict, n_jobs: int = 1, verbose: int = 0, *args, **kwargs) -> dict:
|
||||||
"""
|
"""
|
||||||
Group the ungrouped_dict into different groups.
|
Group the ungrouped_dict into different groups.
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import dill
|
|||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Serializable:
|
class Serializable:
|
||||||
"""
|
"""
|
||||||
Serializable will change the behaviors of pickle.
|
Serializable will change the behaviors of pickle.
|
||||||
|
|||||||
@@ -210,7 +210,9 @@ class OnlineManager(Serializable):
|
|||||||
SIM_LOG_LEVEL = logging.INFO + 1
|
SIM_LOG_LEVEL = logging.INFO + 1
|
||||||
SIM_LOG_NAME = "SIMULATE_INFO"
|
SIM_LOG_NAME = "SIMULATE_INFO"
|
||||||
|
|
||||||
def simulate(self, end_time, frequency="day", task_kwargs={}, model_kwargs={}, signal_kwargs={}) -> Union[pd.Series, pd.DataFrame]:
|
def simulate(
|
||||||
|
self, end_time, frequency="day", task_kwargs={}, model_kwargs={}, signal_kwargs={}
|
||||||
|
) -> Union[pd.Series, pd.DataFrame]:
|
||||||
"""
|
"""
|
||||||
Starting from the current time, this method will simulate every routine in OnlineManager until the end time.
|
Starting from the current time, this method will simulate every routine in OnlineManager until the end time.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user