def train(model_id, messages, hyper): print("RETRAINING STARTED (model id: {})".format(model_id)) dtrain = build_train(TRAIN_DATA, DATAPROCESSORS_PATH, model_id, messages) if hyper == "hyperopt": # from train.train_hyperopt import LGBOptimizer from train.train_hyperopt_mlflow import LGBOptimizer elif hyper == "hyperparameterhunter": # from train.train_hyperparameterhunter import LGBOptimizer from train.train_hyperparameterhunter_mlfow import LGBOptimizer LGBOpt = LGBOptimizer(dtrain, MODELS_PATH) LGBOpt.optimize(maxevals=2, model_id=model_id) print("RETRAINING COMPLETED (model id: {})".format(model_id))
def create_data_processor(): print("creating preprocessor...") dataprocessor = build_train(TRAIN_PATH / 'train.csv', DATAPROCESSORS_PATH)
def create_data_processor(): create_folders() download_data() print("creating preprocessor...") dataprocessor = build_train(TRAIN_PATH / 'train.csv', DATAPROCESSORS_PATH)
def train(model_id, messages): print("RETRAINING STARTED (model id: {})".format(model_id)) dtrain = build_train(TRAIN_DATA, DATAPROCESSORS_PATH, model_id, messages) LGBOpt = LGBOptimizer(dtrain, MODELS_PATH) LGBOpt.optimize(maxevals=10, model_id=model_id) print("RETRAINING COMPLETED (model id: {})".format(model_id))