INNER CODE UNIT · Python

run_slurm

kwsong0113/diffusion-forcing-transformer · main.py:141

def run_slurm(cfg: DictConfig):
    python_args = (
        " ".join(
            [
                (
                    f"'+requeue={generate_unexisting_run_id(cfg.wandb.entity, cfg.wandb.project)}'"
                    if (arg.startswith("+requeue") and not is_run_id(arg.split("=")[1]))
                    else f"'{arg}'"
                )
                for arg in sys.argv[1:]
            ]
        )
        + " +_on_compute_node=True"
    )

    project_root = Path.cwd()
    while not (project_root / ".git").exists():
        project_root = project_root.parent

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…