Commit 4944d755 authored by Dr.李's avatar Dr.李

encode formulas

parent 43779306
...@@ -37,6 +37,7 @@ from alphamind.model import XGBTrainer ...@@ -37,6 +37,7 @@ from alphamind.model import XGBTrainer
from alphamind.model import load_model from alphamind.model import load_model
from alphamind.model.data_preparing import fetch_data_package from alphamind.model.data_preparing import fetch_data_package
from alphamind.model.data_preparing import fetch_train_phase from alphamind.model.data_preparing import fetch_train_phase
from alphamind.model.data_preparing import fetch_predict_phase
from alphamind.execution.naiveexecutor import NaiveExecutor from alphamind.execution.naiveexecutor import NaiveExecutor
from alphamind.execution.thresholdexecutor import ThresholdExecutor from alphamind.execution.thresholdexecutor import ThresholdExecutor
...@@ -67,6 +68,7 @@ __all__ = [ ...@@ -67,6 +68,7 @@ __all__ = [
'factor_tables', 'factor_tables',
'fetch_data_package', 'fetch_data_package',
'fetch_train_phase', 'fetch_train_phase',
'fetch_predict_phase',
'LinearRegression', 'LinearRegression',
'LassoRegression', 'LassoRegression',
'ConstLinearModel', 'ConstLinearModel',
......
...@@ -55,7 +55,7 @@ class ModelBase(metaclass=abc.ABCMeta): ...@@ -55,7 +55,7 @@ class ModelBase(metaclass=abc.ABCMeta):
def load(cls, model_desc: dict): def load(cls, model_desc: dict):
obj_layout = cls() obj_layout = cls()
obj_layout.features = model_desc['features'] obj_layout.features = model_desc['features']
obj_layout.formulas = model_desc['formulas'] obj_layout.formulas = decode(model_desc['formulas'])
obj_layout.trained_time = model_desc['trained_time'] obj_layout.trained_time = model_desc['trained_time']
obj_layout.impl = decode(model_desc['desc']) obj_layout.impl = decode(model_desc['desc'])
return obj_layout return obj_layout
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment