in launcher/nemo/stages.py [0:0]
def create_sm_jobs_script(self, job_folder):
full_recipe_path = Path(job_folder) / "recipe.yaml"
OmegaConf.save(config=self.cfg.get("training"), f=full_recipe_path)
sm_jobs_config_path = Path(job_folder) / "sm_jobs_config.yaml"
OmegaConf.save(config=self.cfg.cluster.get("sm_jobs_config"), f=sm_jobs_config_path)
script_src = Path(ROOT_DIR) / "template" / "sm_jobs.py"
script_dst = Path(job_folder) / "launch.py"
shutil.copy(script_src, script_dst)
# FIXME: Remove transformers requirement when container is updated to include the version
# required to run multi-modal.
if OmegaConf.select(self.cfg, "recipes.model.multi_modal", default=False):
reqs_filename = Path(job_folder) / "requirements.txt"
with open(reqs_filename, "w") as reqs_file:
reqs_file.write(f"transformers=={TRANSFORMERS_VERSION_FOR_MULTIMODAL}")