Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions executorlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,21 @@ def __new__(
elif not disable_dependencies:
_check_pysqa_config_directory(pysqa_config_directory=pysqa_config_directory)
return _ExecutorWithDependencies(
max_workers=max_workers,
backend=backend,
cache_directory=cache_directory,
executor=_create_executor(
max_workers=max_workers,
backend=backend,
cache_directory=cache_directory,
max_cores=max_cores,
resource_dict=resource_dict,
flux_executor=flux_executor,
flux_executor_pmi_mode=flux_executor_pmi_mode,
flux_executor_nesting=flux_executor_nesting,
flux_log_files=flux_log_files,
hostname_localhost=hostname_localhost,
block_allocation=block_allocation,
init_function=init_function,
),
max_cores=max_cores,
resource_dict=resource_dict,
flux_executor=flux_executor,
flux_executor_pmi_mode=flux_executor_pmi_mode,
flux_executor_nesting=flux_executor_nesting,
flux_log_files=flux_log_files,
hostname_localhost=hostname_localhost,
block_allocation=block_allocation,
init_function=init_function,
refresh_rate=refresh_rate,
plot_dependency_graph=plot_dependency_graph,
plot_dependency_graph_filename=plot_dependency_graph_filename,
Expand Down
8 changes: 3 additions & 5 deletions executorlib/interactive/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import Any, Callable, Dict, Optional

from executorlib.base.executor import ExecutorBase
from executorlib.interactive.create import create_executor
from executorlib.interactive.shared import execute_tasks_with_dependencies
from executorlib.standalone.plot import (
draw,
Expand Down Expand Up @@ -34,14 +33,13 @@ class ExecutorWithDependencies(ExecutorBase):

def __init__(
self,
*args: Any,
executor: ExecutorBase,
max_cores: Optional[int] = None,
refresh_rate: float = 0.01,
plot_dependency_graph: bool = False,
plot_dependency_graph_filename: Optional[str] = None,
**kwargs: Any,
) -> None:
super().__init__(max_cores=kwargs.get("max_cores", None))
executor = create_executor(*args, **kwargs)
super().__init__(max_cores=max_cores)
self._set_process(
RaisingThread(
target=execute_tasks_with_dependencies,
Expand Down
Loading