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

add register in config

This commit is contained in:
zhupr
2021-01-23 16:43:20 +08:00
parent a762248d98
commit 3f9f295a87
4 changed files with 71 additions and 62 deletions

View File

@@ -11,8 +11,6 @@ import logging
import platform
import subprocess
from .utils import set_config, config_based_on_c
# init qlib
def init(default_conf="client", **kwargs):
@@ -25,7 +23,7 @@ def init(default_conf="client", **kwargs):
# FIXME: this logger ignored the level in config
logger = get_module_logger("Initialization", level=logging.INFO)
set_config(C, default_conf, **kwargs)
C.set(default_conf, **kwargs)
# check path if server/local
if C.get_uri_type() == C.LOCAL_URI:
@@ -44,7 +42,7 @@ def init(default_conf="client", **kwargs):
if "flask_server" in C:
logger.info(f"flask_server={C['flask_server']}, flask_port={C['flask_port']}")
config_based_on_c(C)
C.register()
logger.info("qlib successfully initialized based on %s settings." % default_conf)
logger.info(f"data_path={C.get_data_path()}")