Ejemplo n.º 1
0
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))
Ejemplo n.º 2
0
def create_data_processor():
    print("creating preprocessor...")
    dataprocessor = build_train(TRAIN_PATH / 'train.csv', DATAPROCESSORS_PATH)
Ejemplo n.º 3
0
def create_data_processor():
    create_folders()
    download_data()
    print("creating preprocessor...")
    dataprocessor = build_train(TRAIN_PATH / 'train.csv', DATAPROCESSORS_PATH)
Ejemplo n.º 4
0
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))