Skip to content

Commit

Permalink
add the orbfit path in the spark env for the orbit fitting with spark
Browse files Browse the repository at this point in the history
  • Loading branch information
FusRoman committed Jul 22, 2024
1 parent c98f4f0 commit 1c17854
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fink_fat/others/launch_spark.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
from fink_fat.others.utils import init_logging


def build_spark_submit(config: configparser.ConfigParser) -> str:
def build_spark_submit(
config: configparser.ConfigParser
) -> str:
"""
Build the spark-submit application command
Expand Down Expand Up @@ -47,6 +49,11 @@ def build_spark_submit(config: configparser.ConfigParser) -> str:
if py_files != "":
spark_submit += f" --py-files {py_files}"

# add the orbfit path as an environment variable in the spark env
orbfit_path = config["SOLVE_ORBIT_PARAMS"]["orbfit_path"]
if orbfit_path != "":
spark_submit += f" --conf spark.executorEnv.ORBFIT_HOME={orbfit_path}"

return spark_submit


Expand Down

0 comments on commit 1c17854

Please sign in to comment.