from datetime import datetime


def get_model_name(params):
    """
    Return the model name according to the hyperparameters and creation time.
    """

    creation_time = datetime.now().strftime('%Y%m%d_%H%M%S')

    # Name to be used for the model
    model_name = "{}_nc{}_bs{}_ep{}_lr{}_ld{}_df{}_uf{}_bt{}_cr{}_bn{}_ts{}".format(
        params['nn_type'],
        params['n_classes'],
        params['batch_size'],
        params['num_epochs'],
        params['learning_rate'],
        params['lr_decay'],
        params['doppler_filtering'],
        params['undersampling_filtering'],
        params['bound_undersampling_to'],
        params['crop_strategy'],
        params['batch_normalization'],
        creation_time
    )

    return model_name