diff --git a/python/fate/arch/common/base_utils.py b/python/fate/arch/common/base_utils.py index d01be71d1f..a7025023bb 100644 --- a/python/fate/arch/common/base_utils.py +++ b/python/fate/arch/common/base_utils.py @@ -25,9 +25,6 @@ from enum import Enum, IntEnum from ._types import BaseType -from .conf_utils import get_base_config - -use_deserialize_safe_module = get_base_config("use_deserialize_safe_module", False) class CustomJSONEncoder(json.JSONEncoder): @@ -111,8 +108,6 @@ def serialize_b64(src, to_str=False): def deserialize_b64(src): src = base64.b64decode(string_to_bytes(src) if isinstance(src, str) else src) - if use_deserialize_safe_module: - return restricted_loads(src) return pickle.loads(src) diff --git a/python/fate/arch/metastore/base_model.py b/python/fate/arch/metastore/base_model.py index 740e00b935..d3f8a84158 100644 --- a/python/fate/arch/metastore/base_model.py +++ b/python/fate/arch/metastore/base_model.py @@ -25,7 +25,7 @@ IntegerField, Metadata, Model, - TextField, + TextField, DateTimeField, ) from ..common import EngineType, conf_utils @@ -40,14 +40,6 @@ ) from ..federation import FederationEngine -is_standalone = ( - conf_utils.get_base_config("default_engines", {}).get(EngineType.FEDERATION).upper() - == FederationEngine.STANDALONE -) -if is_standalone: - from playhouse.apsw_ext import DateTimeField -else: - from peewee import DateTimeField CONTINUOUS_FIELD_TYPE = {IntegerField, FloatField, DateTimeField} AUTO_DATE_TIMESTAMP_FIELD_PREFIX = { diff --git a/python/fate/arch/metastore/db_models.py b/python/fate/arch/metastore/db_models.py index d9bf097406..c5fdeef80b 100644 --- a/python/fate/arch/metastore/db_models.py +++ b/python/fate/arch/metastore/db_models.py @@ -27,17 +27,13 @@ ) from ..common import EngineType, conf_utils, file_utils, log -from ..common.conf_utils import decrypt_database_config from ..federation import FederationEngine from ..metastore.base_model import BaseModel, DateTimeField, JSONField, SerializedField LOGGER = log.getLogger() -DATABASE = decrypt_database_config() -is_standalone = ( - conf_utils.get_base_config("default_engines", {}).get(EngineType.FEDERATION).upper() - == FederationEngine.STANDALONE -) +DATABASE = {"name": "xxx"} +is_standalone = True def singleton(cls, *args, **kw):