From 897967264ecc4769de9f1390bd9a251088b398e0 Mon Sep 17 00:00:00 2001 From: Benjamin Rombaut Date: Fri, 5 Jan 2024 12:33:27 +0100 Subject: [PATCH 1/2] add python option to slurm config --- .../hydra_plugins/hydra_submitit_launcher/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py b/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py index 6da5658a86..d4b845f0bf 100644 --- a/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py +++ b/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py @@ -66,6 +66,8 @@ class SlurmQueueConf(BaseQueueConf): # check the following for more info on slurm_max_num_timeout # https://github.com/facebookincubator/submitit/blob/main/docs/checkpointing.md max_num_timeout: int = 0 + # Python executable to use instead of the default sys.executable + python: Optional[str] = None # Useful to add parameters which are not currently available in the plugin. # Eg: {"mail-user": "blublu@fb.com", "mail-type": "BEGIN"} additional_parameters: Dict[str, Any] = field(default_factory=dict) From 739beb4a22d072ea7b9f05d65de4f19b8fbee1c1 Mon Sep 17 00:00:00 2001 From: Benjamin Rombaut Date: Fri, 5 Jan 2024 12:33:42 +0100 Subject: [PATCH 2/2] add python option to slurm executor --- .../hydra_plugins/hydra_submitit_launcher/submitit_launcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/submitit_launcher.py b/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/submitit_launcher.py index 1efc8e4ce8..c875c61543 100644 --- a/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/submitit_launcher.py +++ b/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/submitit_launcher.py @@ -95,7 +95,7 @@ def launch( params = self.params # build executor init_params = {"folder": self.params["submitit_folder"]} - specific_init_keys = {"max_num_timeout"} + specific_init_keys = {"max_num_timeout", "python"} init_params.update( **{