HyukjinKwon commented on code in PR #40793:
URL: https://github.com/apache/spark/pull/40793#discussion_r1168438544
##########
python/pyspark/ml/torch/tests/test_distributor.py:
##########
@@ -122,6 +122,43 @@ def train_fn(learning_rate: float) -> Any:
return train_fn
+def set_up_test_dirs():
+ gpu_discovery_script_file = tempfile.NamedTemporaryFile(delete=False)
+ gpu_discovery_script_file_name = gpu_discovery_script_file.name
+ gpu_discovery_script_file.write(
+ b'echo {\\"name\\": \\"gpu\\", \\"addresses\\":
[\\"0\\",\\"1\\",\\"2\\"]}'
+ )
+ gpu_discovery_script_file.close()
+
+ # create temporary directory for Worker resources coordination
+ tempdir = tempfile.NamedTemporaryFile(delete=False)
+ os.unlink(tempdir.name)
+ os.chmod(
Review Comment:
Mind add a comment what this means?
--
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]