WeichenXu123 commented on code in PR #40695:
URL: https://github.com/apache/spark/pull/40695#discussion_r1162184392
##########
python/pyspark/ml/torch/distributor.py:
##########
@@ -150,8 +158,18 @@ def __init__(
local_mode: bool = True,
use_gpu: bool = True,
):
- self.spark = _get_active_session()
- self.logger = get_logger(self.__class__.__name__)
+ from pyspark.sql.utils import is_remote
+
+ self.is_remote = is_remote()
+ self.spark = _get_active_session(self.is_remote)
+
+ # indicate whether the server side is local mode
+ self.local_master = False
Review Comment:
```suggestion
self.is_spark_local_master = False
```
--
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]