Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 28, 2024
1 parent d6403e4 commit 30d0c81
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
28 changes: 19 additions & 9 deletions executorlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
from executorlib._version import get_versions as _get_versions
from executorlib.interactive.executor import ExecutorWithDependencies, create_executor
from executorlib.standalone.inputcheck import (
check_plot_dependency_graph as _check_plot_dependency_graph,
check_executor as _check_executor,
)
from executorlib.standalone.inputcheck import (
check_refresh_rate as _check_refresh_rate,
check_nested_flux_executor as _check_nested_flux_executor,
)
from executorlib.standalone.inputcheck import (
check_executor as _check_executor,
check_plot_dependency_graph as _check_plot_dependency_graph,
)
from executorlib.standalone.inputcheck import (
check_nested_flux_executor as _check_nested_flux_executor,
check_refresh_rate as _check_refresh_rate,
)

__version__ = _get_versions()["version"]
Expand Down Expand Up @@ -210,15 +210,25 @@ def __new__(
if cache_directory is None:
cache_directory = "executorlib_cache"
if max_workers != 1:
raise ValueError("The number of workers cannot be controlled with the pysqa based backend.")
raise ValueError(
"The number of workers cannot be controlled with the pysqa based backend."
)
if max_cores != 1:
raise ValueError("The number of cores cannot be controlled with the pysqa based backend.")
raise ValueError(
"The number of cores cannot be controlled with the pysqa based backend."
)
if hostname_localhost is not None:
raise ValueError("The option to connect to hosts based on their hostname is not available with the pysqa based backend.")
raise ValueError(
"The option to connect to hosts based on their hostname is not available with the pysqa based backend."
)
if block_allocation:
raise ValueError("The option block_allocation is not available with the pysqa based backend.")
raise ValueError(
"The option block_allocation is not available with the pysqa based backend."
)
if init_function is not None:
raise ValueError("The option to specify an init_function is not available with the pysqa based backend.")
raise ValueError(
"The option to specify an init_function is not available with the pysqa based backend."
)
_check_executor(executor=flux_executor)
_check_nested_flux_executor(nested_flux_executor=flux_executor_nesting)
return FileExecutor(
Expand Down
10 changes: 5 additions & 5 deletions executorlib/cache/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

from executorlib.base.executor import ExecutorBase
from executorlib.cache.shared import execute_tasks_h5
from executorlib.standalone.cache.spawner import (
execute_in_subprocess,
terminate_subprocess,
)
from executorlib.standalone.inputcheck import (
check_command_line_argument_lst,
check_gpus_per_worker,
check_oversubscribe,
check_threads_per_core,
check_gpus_per_worker,
)
from executorlib.standalone.cache.spawner import (
execute_in_subprocess,
terminate_subprocess,
)
from executorlib.standalone.thread import RaisingThread

Expand Down

0 comments on commit 30d0c81

Please sign in to comment.