Yicong-Huang commented on code in PR #59451:
URL: https://github.com/apache/spark/pull/59451#discussion_r4331851826
##########
python/pyspark/ml/torch/distributor.py:
##########
@@ -448,6 +449,26 @@ def _get_torchrun_args(local_mode: bool, num_processes:
int) -> Tuple[List[Any],
]
return torchrun_args, processes_per_node
+ @staticmethod
+ def _reserve_free_port(address: str) -> socket.socket:
Review Comment:
No, it's called from the barrier task's `get_free_port`
(`distributor.py:716`), which holds the returned socket until training
finishes. It's a separate staticmethod so `test_reserve_free_port` can check
that plain binds fail while `TCPStore` can still listen on the port.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]