mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-11 06:46:56 +08:00
fix(security): use RestrictedUnpickler in load_instance (#2153)
* fix(security): enforce RestrictedUnpickler for load_instance to prevent unsafe pickle deserialization * fix: lint error
This commit is contained in:
@@ -17,7 +17,6 @@ from qlib.rl.utils.finite_env import (
|
||||
generate_nan_observation,
|
||||
)
|
||||
|
||||
|
||||
_test_space = gym.spaces.Dict(
|
||||
{
|
||||
"sensors": gym.spaces.Dict(
|
||||
|
||||
@@ -13,7 +13,6 @@ from qlib.workflow import R
|
||||
from qlib.tests import TestAutoData
|
||||
from qlib.tests.config import GBDT_MODEL, get_dataset_config, CSI300_MARKET
|
||||
|
||||
|
||||
CSI300_GBDT_TASK = {
|
||||
"model": GBDT_MODEL,
|
||||
"dataset": get_dataset_config(
|
||||
|
||||
@@ -16,7 +16,6 @@ sys.path.append(str(Path(__file__).resolve().parent.parent.joinpath("scripts")))
|
||||
from get_data import GetData
|
||||
from dump_bin import DumpDataAll, DumpDataFix
|
||||
|
||||
|
||||
DATA_DIR = Path(__file__).parent.joinpath("test_dump_data")
|
||||
SOURCE_DIR = DATA_DIR.joinpath("source")
|
||||
SOURCE_DIR.mkdir(exist_ok=True, parents=True)
|
||||
|
||||
@@ -19,7 +19,6 @@ from dump_pit import DumpPitData
|
||||
sys.path.append(str(Path(__file__).resolve().parent.parent.joinpath("scripts/data_collector/pit")))
|
||||
from collector import Run
|
||||
|
||||
|
||||
pd.set_option("display.width", 1000)
|
||||
pd.set_option("display.max_columns", None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user