from typing import Dict
from typing import Any


def aligned_train_configs(config1: Dict[str, Any], config2: Dict[str, Any]) -> bool:
    """
    Check whether two training configurations are aligned, i.e. a training run with
    ``config1`` that was interrupted can be resumed with ``config2``.
    """

    aligned_settings = [
        "env_name",
        "lr_schedule_type",
        "initial_lr",
        "final_lr",
        "normalize_transition",
        "normalize_first_n",
        "architecture_config",
        "evaluation_freq",
        "evaluation_episodes",
        "time_limit",
    ]
    equal = True
    for setting in aligned_settings:
        equal = equal and config1[setting] == config2[setting]

    return equal