def _validate_k8_custom_script_workflow_mandatory_argument()

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


def _validate_k8_custom_script_workflow_mandatory_argument(config: DictConfig) -> None:
    cluster_type = get_argument(config, "cluster.cluster_type")
    training_cfg = get_argument(config, "training_cfg")
    if cluster_type == "k8s" and training_cfg is not None:
        k8_custom_script_mandatory_arguments = [
            "container",
            "env_vars",
            "training_cfg",
            "training_cfg.entry_script",
            "training_cfg.run",
            "training_cfg.run.name",
            "training_cfg.run.nodes",
            "cluster",
            "cluster.cluster_type",
            "cluster.instance_type",
            "cluster.cluster_config",
        ]
        for argument_name in k8_custom_script_mandatory_arguments:
            argument = get_argument(config, argument_name)
            _validate_mandatory_argument(argument, argument_name)