taps.executor.parsl¶
ParslLocalConfig
¶
Bases: ExecutorConfig
Local ParslPoolExecutor
plugin configuration.
Simple Parsl configuration that uses the
HighThroughputExecutor
on the local node.
Parameters:
-
name
(Literal[str]
, default:'parsl-local'
) –Executor name.
-
workers
(int | None
, default:None
) –Maximum number of parsl workers.
-
run_dir
(str
, default:'parsl-runinfo'
) –Parsl run directory within the app run directory.
get_executor
¶
Create an executor instance from the config.
Source code in taps/executor/parsl.py
ParslHTExConfig
¶
Bases: ExecutorConfig
HTEx ParslPoolExecutor
plugin configuration.
These parameters are a subset of
parsl.config.Config
.
For simple, single-node HTEx deployments, prefer
ParslLocalConfig
.
Parameters:
-
name
(Literal[str]
, default:'parsl-htex'
) –Executor name.
-
htex
(ForwardRef('Union[HTExConfig, Dict[str, HTExConfig]]')
) –HTEx configuration.
-
app_cache
(bool | None
, default:None
) –Enable app caching.
-
retries
(int
, default:0
) –Number of task retries in case of task failure.
-
strategy
(str | None
, default:None
) –Block scaling strategy.
-
max_idletime
(float | None
, default:None
) –Idle time before strategy can shutdown unused blocks.
-
monitoring
(ForwardRef('Optional[MonitoringConfig]')
, default:None
) –Database monitoring configuration.
-
run_dir
(str
, default:'parsl-runinfo'
) –Parsl run directory within the app run directory.
get_executor
¶
Create an executor instance from the config.
Source code in taps/executor/parsl.py
HTExConfig
¶
Bases: BaseModel
Configuration for Parl's parsl.executors.HighThroughputExecutor
.
Parameters:
-
label
(str
, default:'taps-htex'
) –Executor label.
-
provider
(ForwardRef('Optional[ProviderConfig]')
, default:None
) –Configuration for the compute resource provider.
-
address
(ForwardRef('Optional[Union[str, AddressConfig]]')
, default:None
) –Address to connect to the main Parsl process.
-
manager_selector
(ForwardRef('Optional[ManagerSelectorConfig]')
, default:None
) –Configuration for the manager selector (available in Parsl v2024.8.5 and later).
-
worker_ports
(Tuple[int, int] | None
, default:None
) –Ports used by workers to connect to Parsl
-
worker_port_range
(Tuple[int, int] | None
, default:None
) –Range of ports to choose worker ports from.
-
interchange_port_range
(Tuple[int, int] | None
, default:None
) –Ports used by Parsl to connect to interchange.
Note
Optional attributes will default to Parsl's default values.
Note
When using multiple HTExs at the same time, the label
attribute
must be changed to be unique for each executor.
Note
Extra options passed to this model will be provided as keyword
arguments to
parsl.executors.HighThroughputExecutor
.
get_executor
¶
get_executor() -> HighThroughputExecutor
Create an executor instance from the config.
Source code in taps/executor/parsl.py
AddressConfig
¶
ProviderConfig
¶
Bases: BaseModel
Parsl execution provider configuration.
Parameters:
-
kind
(str
) –Execution provider class name
-
launcher
(ForwardRef('Optional[LauncherConfig]')
, default:None
) –Launcher configuration.
Example
Create a provider configuration and call
get_provider()
.
from taps.executor.parsl import ProviderConfig
config = ProviderConfig(
kind='PBSProProvider',
account='my-account',
cpus_per_node=32,
init_blocks=1,
max_blocks=1,
min_blocks=0,
nodes_per_block=1,
queue='debug',
select_options='ngpus=4',
walltime='00:30:00',
worker_init='module load conda',
)
config.get_provider()
get_provider
¶
get_provider() -> ExecutionProvider
Create a provider from the configuration.
Source code in taps/executor/parsl.py
LauncherConfig
¶
Bases: BaseModel
Parsl launcher configuration.
Parameters:
-
kind
(str
) –Launcher class name.
Example
Create a launcher configuration and call
get_launcher()
.
ManagerSelectorConfig
¶
Bases: BaseModel
Parsl HTEx manager selector configuration.
Parameters:
-
kind
(str
) –Manager selector class name.
Example
Create a manager selector configuration and call
get_manager_selector()
.
get_manager_selector
¶
Create a manager selector from the configuration.
Source code in taps/executor/parsl.py
MonitoringConfig
¶
Bases: BaseModel
Parsl monitoring system configuration.
Parameters:
-
hub_address
(str | AddressConfig | None
, default:None
) –Address to connect to the monitoring hub.
-
hub_port_range
(Tuple[int, int] | None
, default:None
) –Port range for a ZMQ channel from executor process.
Example
Create a monitoring configuration and call
get_monitoring()
.
from taps.executor.parsl import MonitoringConfig
config = MonitoringConfig(
hub_address='localhost',
logging_endpoint='sqlite:///parsl-runinfo/monitoring.db',
resource_monitoring_interval=1,
hub_port=55055,
)
config.get_monitoring()
MonitoringHub
is equivalent to creating it manually.
get_monitoring
¶
get_monitoring() -> MonitoringHub
Create a MonitoringHub from the configuration.