mathewjacob1002 commented on code in PR #41778: URL: https://github.com/apache/spark/pull/41778#discussion_r1253708094
########## python/pyspark/ml/torch/deepspeed/deepspeed_distributer.py: ########## @@ -0,0 +1,167 @@ +import json +import os +import subprocess +import tempfile +from typing import ( + Union, + Callable, + List, + Dict, + Optional, + Any, +) +from pyspark.ml.torch.distributor import Distributor, TorchDistributor + + +def write_to_location(location: str, content: str) -> None: + os.makedirs(os.path.dirname(location), exist_ok=True) + with open(location, "a") as f: + f.write(content) Review Comment: depending on the SSHEnvManager code, we may use this a lot, hence why I made it a separate function. I just made it a util in the case we use this a lot. -- 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]
