def get_run_id(model_type, size, num_layers, lr, drop_frac=0.0, embedding=None,
               decode_type=None, decode_layers=None, bidirectional=False, **kwargs):
    """Generate unique ID from model params."""
    run = "{}_{:03d}_x{}_{:1.0e}_drop{}".format(model_type, size, num_layers, lr,
                                                int(100 * drop_frac)).replace('e-', 'm')
    if embedding:
        run += '_emb{}'.format(embedding)
    if decode_type:
        run += '_decode{}'.format(decode_type)
        if decode_layers:
            run += '_x{}'.format(decode_layers)
    if bidirectional:
        run += '_bidir'

    return run