Skip to content

Commit

Permalink
rename submit-side executor monitoring radio to clarify it isn't the …
Browse files Browse the repository at this point in the history
…one that will be used by remotely-executed jobs, but instead by the subit side for (eg) block related messages

this is to avoid confusion with definitions related to the worker-side radio included in the submit side class (what is at the moment the exeutor.radio_mode attribute, but will change soon)

TODO: add a docstring that clarifies the purpose of this
  • Loading branch information
benclifford committed Jun 24, 2024
1 parent 339d787 commit 7c12fed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion parsl/dataflow/dflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ def add_executors(self, executors: Sequence[ParslExecutor]) -> None:
executor.hub_address = self.hub_address
executor.hub_zmq_port = self.hub_zmq_port
if self.monitoring:
executor.monitoring_radio = self.monitoring.radio
executor.submit_monitoring_radio = self.monitoring.radio
if hasattr(executor, 'provider'):
if hasattr(executor.provider, 'script_dir'):
executor.provider.script_dir = os.path.join(self.run_dir, 'submit_scripts')
Expand Down
14 changes: 7 additions & 7 deletions parsl/executors/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ def __init__(
*,
hub_address: Optional[str] = None,
hub_zmq_port: Optional[int] = None,
monitoring_radio: Optional[MonitoringRadioSender] = None,
submit_monitoring_radio: Optional[MonitoringRadioSender] = None,
run_dir: str = ".",
run_id: Optional[str] = None,
):
self.hub_address = hub_address
self.hub_zmq_port = hub_zmq_port
self.monitoring_radio = monitoring_radio
self.submit_monitoring_radio = submit_monitoring_radio
self.run_dir = os.path.abspath(run_dir)
self.run_id = run_id

Expand Down Expand Up @@ -147,11 +147,11 @@ def hub_zmq_port(self, value: Optional[int]) -> None:
self._hub_zmq_port = value

@property
def monitoring_radio(self) -> Optional[MonitoringRadioSender]:
def submit_monitoring_radio(self) -> Optional[MonitoringRadioSender]:
"""Local radio for sending monitoring messages
"""
return self._monitoring_radio
return self._submit_monitoring_radio

@monitoring_radio.setter
def monitoring_radio(self, value: Optional[MonitoringRadioSender]) -> None:
self._monitoring_radio = value
@submit_monitoring_radio.setter
def submit_monitoring_radio(self, value: Optional[MonitoringRadioSender]) -> None:
self._submit_monitoring_radio = value
4 changes: 2 additions & 2 deletions parsl/executors/status_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ def workers_per_node(self) -> Union[int, float]:

def send_monitoring_info(self, status: Dict) -> None:
# Send monitoring info for HTEX when monitoring enabled
if self.monitoring_radio:
if self.submit_monitoring_radio:
msg = self.create_monitoring_info(status)
logger.debug("Sending message {} to hub from job status poller".format(msg))
self.monitoring_radio.send((MessageType.BLOCK_INFO, msg))
self.submit_monitoring_radio.send((MessageType.BLOCK_INFO, msg))

def create_monitoring_info(self, status: Dict[str, JobStatus]) -> Sequence[object]:
"""Create a monitoring message for each block based on the poll status.
Expand Down

0 comments on commit 7c12fed

Please sign in to comment.