from datetime import datetime


def generate_model_name(grid_size, max_iterations, learning_rate):
    """
    Parameters
    ----------
    grid_size : api_params.TrainParameters
        Same parameter object used for training a model.

    max_iterations : int
        Max iterations that model training on.

    learning_rate : float
        Learning rate that model training on.

    Returns
    -------
    model_name : str
        A unique string build using parameters attributes.
    """
    grid_x, grid_y = grid_size
    return f"{datetime.now().strftime('%d-%m-%Y_%Hh%Mm%Ss')}T_{grid_x}X{grid_y}_{max_iterations}N_{learning_rate}LR"