diff --git a/examples/ML+DL-Examples/Spark-Rapids-ML/pca/notebooks/pca.ipynb b/examples/ML+DL-Examples/Spark-Rapids-ML/pca/notebooks/pca.ipynb index 9f41e03e..3bf570fe 100644 --- a/examples/ML+DL-Examples/Spark-Rapids-ML/pca/notebooks/pca.ipynb +++ b/examples/ML+DL-Examples/Spark-Rapids-ML/pca/notebooks/pca.ipynb @@ -78,7 +78,11 @@ " '''\n", " If no active Spark session is found, initialize and configure a new one. \n", " '''\n", + " import socket\n", + " hostname = socket.gethostname()\n", + "\n", " conf = SparkConf()\n", + " conf.setMaster(f\"spark://{hostname}:7077\") # Assuming master is on host and default port. \n", " conf.set(\"spark.task.maxFailures\", \"1\")\n", " conf.set(\"spark.driver.memory\", \"10g\")\n", " conf.set(\"spark.executor.memory\", \"8g\")\n",