def get_filename_for_experiment(config, **kwargs):
    """
    How do we want to save the files
    [Config]
        - experiment_name
        - model
        - prompt_template
    [File Being Loaded]
        - Sports-Fruit
            - Fruit category
            - Sport Category
            - sample_id
        - Math-Fruit
            - Fruit category
            - Math Answer
            - sample_id
        - Sport-Math
            - Sport Category
            - Math Answer
            - sample_id
        - Iso Count
            - Query
            - Image count
            - Text count
    """
    experiment_name = config['experiment_name']
    model_name = config['model']['model_id'].replace("/", "-")
    prompt_template = config['task']['prompt_template']
    image_signal = config['task'].get('image_type', "actual")

    if experiment_name in ["fruit_sport", "sport_fruit"]:
        fruit_category = kwargs.get('fruit_category', 'unknown_fruit')
        sport_category = kwargs.get('sport_category', 'unknown_sport')
        sample_id = kwargs.get('sample_id', 'unknown_id')
        filename = f"{experiment_name}__image-{image_signal}__{prompt_template}__fruit-{fruit_category}__sport-{sport_category}__id-{sample_id}"
    elif experiment_name in ["fruit_math", "math_fruit"]:
        fruit_category = kwargs.get('fruit_category', 'unknown_fruit')
        math_answer = kwargs.get('math_answer', 'unknown_answer')
        sample_id = kwargs.get('sample_id', 'unknown_id')
        filename = f"{experiment_name}__image-{image_signal}__{prompt_template}__fruit-{fruit_category}__math-{math_answer}__id-{sample_id}"
    elif experiment_name == "math_sport":
        sport_category = kwargs.get('sport_category', 'unknown_sport')
        math_answer = kwargs.get('math_answer', 'unknown_answer')
        sample_id = kwargs.get('sample_id', 'unknown_id')
        filename = f"{experiment_name}__{prompt_template}__sport-{sport_category}__math-{math_answer}__id-{sample_id}"
    elif experiment_name == "iso_count":
        query_item = kwargs.get('query_item', 'unknown_query')
        image_count = kwargs.get('image_count', 'unknown_image_count')
        text_count = kwargs.get('text_count', 'unknown_text_count')
        filename = f"{experiment_name}__image-{image_signal}__{prompt_template}__query-{query_item}__imgcount-{image_count}__textcount-{text_count}"
    else:
        filename = f"{experiment_name}__image-{image_signal}__{prompt_template}__unknown_experiment"

    return filename


def set_seed(seed):
    import random
    import numpy as np
    import torch

    random.seed(seed)
    np.random.seed(seed)
    torch.manual_seed(seed)
    if torch.cuda.is_available():
        torch.cuda.manual_seed_all(seed)