in launcher/nemo/stages.py [0:0]
def get_cluster_type(self) -> str:
"""
Get cluster type depending on whether configuration is custom or recipe
"""
# custom configurations have the `training_cfg` key
is_custom = self.cfg.get("training_cfg") is not None
cluster_type = None
if is_custom:
cluster_type = OmegaConf.select(self.cfg, "cluster.cluster_type")
else:
cluster_type = self.cfg.get("cluster_type")
if cluster_type is None:
raise AttributeError("`cluster_type` is not defined in the configuration file")
return cluster_type