1313__all__ = []
1414
1515
16- try :
17- from executorlib .cache .executor import FileExecutor
18-
19- __all__ += [FileExecutor ]
20- except ImportError :
21- pass
22-
23-
2416class Executor :
2517 """
2618 The executorlib.Executor leverages either the message passing interface (MPI), the SLURM workload manager or
@@ -47,6 +39,7 @@ class Executor:
4739 flux_executor (flux.job.FluxExecutor): Flux Python interface to submit the workers to flux
4840 flux_executor_pmi_mode (str): PMI interface to use (OpenMPI v5 requires pmix) default is None (Flux only)
4941 flux_executor_nesting (bool): Provide hierarchically nested Flux job scheduler inside the submitted function.
42+ pysqa_config_directory (str, optional): path to the pysqa config directory (only for pysqa based backend).
5043 hostname_localhost (boolean): use localhost instead of the hostname to establish the zmq connection. In the
5144 context of an HPC cluster this essential to be able to communicate to an
5245 Executor running on a different compute node within the same allocation. And
@@ -95,6 +88,7 @@ def __init__(
9588 flux_executor = None ,
9689 flux_executor_pmi_mode : Optional [str ] = None ,
9790 flux_executor_nesting : bool = False ,
91+ pysqa_config_directory : Optional [str ] = None ,
9892 hostname_localhost : Optional [bool ] = None ,
9993 block_allocation : bool = True ,
10094 init_function : Optional [callable ] = None ,
@@ -115,6 +109,7 @@ def __new__(
115109 flux_executor = None ,
116110 flux_executor_pmi_mode : Optional [str ] = None ,
117111 flux_executor_nesting : bool = False ,
112+ pysqa_config_directory : Optional [str ] = None ,
118113 hostname_localhost : Optional [bool ] = None ,
119114 block_allocation : bool = True ,
120115 init_function : Optional [callable ] = None ,
@@ -149,6 +144,7 @@ def __new__(
149144 flux_executor (flux.job.FluxExecutor): Flux Python interface to submit the workers to flux
150145 flux_executor_pmi_mode (str): PMI interface to use (OpenMPI v5 requires pmix) default is None (Flux only)
151146 flux_executor_nesting (bool): Provide hierarchically nested Flux job scheduler inside the submitted function.
147+ pysqa_config_directory (str, optional): path to the pysqa config directory (only for pysqa based backend).
152148 hostname_localhost (boolean): use localhost instead of the hostname to establish the zmq connection. In the
153149 context of an HPC cluster this essential to be able to communicate to an
154150 Executor running on a different compute node within the same allocation. And
@@ -180,7 +176,24 @@ def __new__(
180176 resource_dict .update (
181177 {k : v for k , v in default_resource_dict .items () if k not in resource_dict }
182178 )
183- if not disable_dependencies :
179+ if "pysqa_" in backend and not plot_dependency_graph :
180+ from executorlib .cache .executor import create_file_executor
181+
182+ return create_file_executor (
183+ max_workers = max_workers ,
184+ backend = backend ,
185+ max_cores = max_cores ,
186+ cache_directory = cache_directory ,
187+ resource_dict = resource_dict ,
188+ flux_executor = flux_executor ,
189+ flux_executor_pmi_mode = flux_executor_pmi_mode ,
190+ flux_executor_nesting = flux_executor_nesting ,
191+ pysqa_config_directory = pysqa_config_directory ,
192+ hostname_localhost = hostname_localhost ,
193+ block_allocation = block_allocation ,
194+ init_function = init_function ,
195+ )
196+ elif not disable_dependencies :
184197 return ExecutorWithDependencies (
185198 max_workers = max_workers ,
186199 backend = backend ,
0 commit comments