Skip to content

Commit

Permalink
remove redundant functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Feb 1, 2025
1 parent 4f4516b commit 454b336
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
21 changes: 1 addition & 20 deletions executorlib/interfaces/flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
check_oversubscribe,
check_plot_dependency_graph,
check_pmi,
check_pysqa_config_directory,
check_refresh_rate,
validate_number_of_cores,
)
Expand Down Expand Up @@ -396,8 +395,7 @@ def __new__(
init_function=init_function,
disable_dependencies=disable_dependencies,
)
elif not disable_dependencies:
check_pysqa_config_directory(pysqa_config_directory=pysqa_config_directory)
else:
return ExecutorWithDependencies(
executor=create_flux_executor(
max_workers=max_workers,
Expand All @@ -417,23 +415,6 @@ def __new__(
plot_dependency_graph=plot_dependency_graph,
plot_dependency_graph_filename=plot_dependency_graph_filename,
)
else:
check_pysqa_config_directory(pysqa_config_directory=pysqa_config_directory)
check_plot_dependency_graph(plot_dependency_graph=plot_dependency_graph)
check_refresh_rate(refresh_rate=refresh_rate)
return create_flux_executor(
max_workers=max_workers,
cache_directory=cache_directory,
max_cores=max_cores,
resource_dict=resource_dict,
flux_executor=None,
flux_executor_pmi_mode=None,
flux_executor_nesting=False,
flux_log_files=False,
hostname_localhost=hostname_localhost,
block_allocation=block_allocation,
init_function=init_function,
)


def create_flux_executor(
Expand Down
17 changes: 1 addition & 16 deletions executorlib/interfaces/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from executorlib.standalone.inputcheck import (
check_init_function,
check_plot_dependency_graph,
check_pysqa_config_directory,
check_refresh_rate,
validate_number_of_cores,
)
Expand Down Expand Up @@ -188,8 +187,7 @@ def __new__(
init_function=init_function,
disable_dependencies=disable_dependencies,
)
elif not disable_dependencies:
check_pysqa_config_directory(pysqa_config_directory=pysqa_config_directory)
else:
return ExecutorWithDependencies(
executor=create_slurm_executor(
max_workers=max_workers,
Expand All @@ -205,19 +203,6 @@ def __new__(
plot_dependency_graph=plot_dependency_graph,
plot_dependency_graph_filename=plot_dependency_graph_filename,
)
else:
check_pysqa_config_directory(pysqa_config_directory=pysqa_config_directory)
check_plot_dependency_graph(plot_dependency_graph=plot_dependency_graph)
check_refresh_rate(refresh_rate=refresh_rate)
return create_slurm_executor(
max_workers=max_workers,
cache_directory=cache_directory,
max_cores=max_cores,
resource_dict=resource_dict,
hostname_localhost=hostname_localhost,
block_allocation=block_allocation,
init_function=init_function,
)


class SlurmAllocationExecutor:
Expand Down

0 comments on commit 454b336

Please sign in to comment.