Skip to content

Commit 6116541

Browse files
committed
Merge remote-tracking branch 'origin/main' into docstring
2 parents 062eedc + 9b9f51e commit 6116541

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

executorlib/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from executorlib.executor.base import BaseExecutor
12
from executorlib.executor.flux import (
23
FluxClusterExecutor,
34
FluxJobExecutor,
@@ -13,6 +14,7 @@
1314

1415
__all__: list[str] = [
1516
"get_cache_data",
17+
"BaseExecutor",
1618
"FluxJobExecutor",
1719
"FluxClusterExecutor",
1820
"SingleNodeExecutor",

executorlib/executor/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import queue
2+
from abc import ABC
23
from concurrent.futures import (
34
Executor as FutureExecutor,
45
)
@@ -10,7 +11,7 @@
1011
from executorlib.task_scheduler.base import TaskSchedulerBase
1112

1213

13-
class ExecutorBase(FutureExecutor):
14+
class BaseExecutor(FutureExecutor, ABC):
1415
"""
1516
Interface class for the executor.
1617

executorlib/executor/flux.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Callable, Optional, Union
22

3-
from executorlib.executor.base import ExecutorBase
3+
from executorlib.executor.base import BaseExecutor
44
from executorlib.standalone.inputcheck import (
55
check_command_line_argument_lst,
66
check_init_function,
@@ -17,7 +17,7 @@
1717
from executorlib.task_scheduler.interactive.onetoone import OneProcessTaskScheduler
1818

1919

20-
class FluxJobExecutor(ExecutorBase):
20+
class FluxJobExecutor(BaseExecutor):
2121
"""
2222
The executorlib.FluxJobExecutor leverages either the message passing interface (MPI), the SLURM workload manager or
2323
preferable the flux framework for distributing python functions within a given resource allocation. In contrast to
@@ -201,7 +201,7 @@ def __init__(
201201
)
202202

203203

204-
class FluxClusterExecutor(ExecutorBase):
204+
class FluxClusterExecutor(BaseExecutor):
205205
"""
206206
The executorlib.FluxClusterExecutor leverages either the message passing interface (MPI), the SLURM workload manager
207207
or preferable the flux framework for distributing python functions within a given resource allocation. In contrast

executorlib/executor/single.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Callable, Optional, Union
22

3-
from executorlib.executor.base import ExecutorBase
3+
from executorlib.executor.base import BaseExecutor
44
from executorlib.standalone.inputcheck import (
55
check_command_line_argument_lst,
66
check_gpus_per_worker,
@@ -17,7 +17,7 @@
1717
from executorlib.task_scheduler.interactive.onetoone import OneProcessTaskScheduler
1818

1919

20-
class SingleNodeExecutor(ExecutorBase):
20+
class SingleNodeExecutor(BaseExecutor):
2121
"""
2222
The executorlib.SingleNodeExecutor leverages either the message passing interface (MPI), the SLURM workload manager
2323
or preferable the flux framework for distributing python functions within a given resource allocation. In contrast

executorlib/executor/slurm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Callable, Optional, Union
22

3-
from executorlib.executor.base import ExecutorBase
3+
from executorlib.executor.base import BaseExecutor
44
from executorlib.standalone.inputcheck import (
55
check_init_function,
66
check_plot_dependency_graph,
@@ -18,7 +18,7 @@
1818
)
1919

2020

21-
class SlurmClusterExecutor(ExecutorBase):
21+
class SlurmClusterExecutor(BaseExecutor):
2222
"""
2323
The executorlib.SlurmClusterExecutor leverages either the message passing interface (MPI), the SLURM workload
2424
manager or preferable the flux framework for distributing python functions within a given resource allocation. In
@@ -193,7 +193,7 @@ def __init__(
193193
)
194194

195195

196-
class SlurmJobExecutor(ExecutorBase):
196+
class SlurmJobExecutor(BaseExecutor):
197197
"""
198198
The executorlib.SlurmJobExecutor leverages either the message passing interface (MPI), the SLURM workload manager or
199199
preferable the flux framework for distributing python functions within a given resource allocation. In contrast to

0 commit comments

Comments
 (0)