def _validate_cluster_type_argument()

in launcher/config_validator/value_validator.py [0:0]


def _validate_cluster_type_argument(config: DictConfig) -> None:
    """
    Check only valid cluster_type is provided

    Parameters:
    config (DictConfig): Configuration dictionary
    """
    cluster_type_argument_name = "cluster.cluster_type"
    cluster_type = get_argument(config, cluster_type_argument_name)
    supported_cluster_types = ["slurm", "k8s", "sm_jobs"]
    if cluster_type is not None and cluster_type not in supported_cluster_types:
        raise ValueError("Provided cluster_type is not supported")