How to use the submitit.AutoExecutor function in submitit

To help you get started, we’ve selected a few submitit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebookresearch / hydra / plugins / submitit / hydra_plugins / submitit / submitit_launcher.py View on Github external
def launch(self, job_overrides):
        # lazy import to ensurue plugin discovery remains fast
        import submitit

        num_jobs = len(job_overrides)
        assert num_jobs > 0
        with open_dict(self.config):
            self.config.hydra.job.num_jobs = num_jobs

        if self.queue == "auto":
            executor = submitit.AutoExecutor(
                folder=self.folder, conda_file=self.conda_file
            )
        elif self.queue == "slurm":
            executor = submitit.SlurmExecutor(folder=self.folder)
        elif self.queue == "chronos":
            executor = submitit.ChronosExecutor(
                folder=self.folder, conda_file=self.conda_file
            )
        elif self.queue == "local":
            executor = submitit.LocalExecutor(folder=self.folder)
        else:
            raise RuntimeError("Unsupported queue type {}".format(self.queue))

        executor.update_parameters(**self.queue_parameters[self.queue])

        log.info("Sweep output dir : {}".format(self.config.hydra.sweep.dir))

submitit

"Python 3.8+ toolbox for submitting jobs to Slurm

MIT
Latest version published 3 months ago

Package Health Score

86 / 100
Full package analysis