def train_model(run, data, alpha):
    run.log('alpha', alpha)
    run.parent.log('alpha', alpha)
    reg = Ridge(alpha=alpha)
    reg.fit(data['train']['X'], data['train']['y'])
    preds = reg.predict(data['test']['X'])
    run.log('mse', mean_squared_error(preds, data['test']['y']), description='Mean squared error metric')
    run.parent.log('mse', mean_squared_error(preds, data['test']['y']), description='Mean squared error metric')
    return reg
def train_model(run, data, alpha):
    run.log('alpha', alpha)
    run.parent.log('alpha', alpha)
    reg = Ridge(alpha=alpha)
    reg.fit(data['train']['X'], data['train']['y'])
    preds = reg.predict(data['test']['X'])
    run.log('mse', mean_squared_error(preds, data['test']['y']), description='Mean squared error metric')
    run.parent.log('mse', mean_squared_error(preds, data['test']['y']), description='Mean squared error metric')
    return reg