Commit d95d6ca
[major] Refactor the Executor interface (#548)
* [major] Refactor the Executor interface
Replace the backend parameter from the initialization of the Executor class with individual executor classes for the individual backends:
* `Executor(backend="local")` becomes `from executorlib import LocalExecutor§
* `Executor(backend="flux_allocation")` becomes `from executorlib import FluxAllocationExecutor§
* `Executor(backend="flux_submission")` becomes `from executorlib import FluxSubmissionExecutor§
* `Executor(backend="slurm_allocation")` becomes "SlurmAllocationExecutor"
* `Executor(backend="slurm_submission")` becomes `from executorlib import SlurmSubmissionExecutor`
This has two advantages: On the one hand it is less error prone to mistyping the backend name, as the user can use auto completion to import the right module. On the other hand it is more consistent with the standard library which defines the `ProcessPoolExecutor` and the `ThreadPoolExecutor`, rather than a `backend` parameter.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix test
* update benchmark
* move interfaces to individual modules
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove create
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove redundant functionality
* Move graph tests
* remove core check
* clean up
* more tests
* fix import
* more fixes
* Rename LocalExecutor to SingleNodeExecutor
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test block allocation
* fix
* flux fix
* Rename interfaces
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix docstrings
* add docstrings to create_*_executor() function
* fix test
* merge
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 11d44cc commit d95d6ca
File tree
24 files changed
+1820
-773
lines changed- .github/workflows
- executorlib
- interactive
- interfaces
- notebooks
- tests
- benchmark
24 files changed
+1820
-773
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
Large diffs are not rendered by default.
This file was deleted.
Whitespace-only changes.
0 commit comments