Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
svittoz committed Dec 21, 2023
1 parent cbeba52 commit 9b2d120
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions eds_scikit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def set_env_variables() -> None:
def improve_performances(
to_add_conf: List[Tuple[str, str]] = [],
quiet_spark: bool = True,
app_name: str = ""
app_name: str = "",
) -> Tuple[SparkSession, SparkContext, SparkSession.sql]:
"""
(Re)defines various Spark variable with some configuration changes
Expand Down Expand Up @@ -125,10 +125,12 @@ def improve_performances(
("spark.sql.execution.arrow.pyspark.enabled", "true"),
]
)

for key, value in to_add_conf:
if not conf.contains(key):
logger.warning(f"{key} not in default spark config. Make sure it corresponds to existing config parameter.")
logger.warning(
f"{key} not in default spark config. Make sure it corresponds to existing config parameter."
)
conf.set(key, value)

# Stopping context to add necessary env variables
Expand Down

0 comments on commit 9b2d120

Please sign in to comment.