class_docstr: a job that loads yaml config.
class_docstr_tok: ["a","job","that","loads","yaml","config","."]
docstr: load a yaml config of a job and save generated configs as yaml for each task.
  return: a list of files to run as specified by `run_task`.
docstr_tok: ["load","a","yaml","config","of","a","job","and","save","generated","configs","as","yaml","for","each","task",".","return",":","a","list","of","files","to","run","as","specified","by","`","run_task","`","."]
code: def __init__(self, fn):
      """
      load a yaml config of a job and save generated configs as yaml for each task.
      return: a list of files to run as specified by `run_task`.
      """
      if fn.endswith(".py"):
          # a python command.
          self.backend = "python"
          self.run_yamls = [fn]
          return
  
      job_config = recursive_config(fn)
      if job_config.base_dir is None:  # single file job config.
          self.run_yamls = [fn]
          return
  
      self.project_dir = os.path.join(
          "projects", job_config.project_dir
      )
      self.run_dir = os.path.join("runs", job_config.project_dir)
  
      if job_config.run_task is not None:
          run_yamls = []
          for stage in job_config.run_task:
              # each stage can have multiple tasks running in parallel.
              if OmegaConf.is_list(stage):
                  stage_yamls = []
                  for task_file in stage:
                      stage_yamls.append(
                          os.path.join(self.project_dir, task_file)
                      )
                  run_yamls.append(stage_yamls)
              else:
                  run_yamls.append(
                      os.path.join(self.project_dir, stage)
                  )
          self.run_yamls = run_yamls
      configs_to_save = self._overwrite_task(job_config)
      self._save_configs(configs_to_save)
  
file_path: fairseq/examples/MMPT/locallaunch.py
imports: import argparse
  import os
  from omegaconf import OmegaConf
  from mmpt.utils import recursive_config, overwrite_dir
  from mmpt_cli.localjob import LocalJob
label_desc: Use image node_id 1 to create a new Pipeline object from inherited base classes: object with example: obj = Pipeline(fn)