Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions python-package/xgboost/spark/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,10 @@ def _run_job() -> Tuple[str, str]:
_train_booster, # type: ignore
schema="data string",
)
# TODO: In spark connect, use `dataframe.mapInPandas(..., barrier=True)`
# and remove `rdd.barrier().mapPartitions(lambda x: x)`
# and for stage scheduling, similarly, use
# `dataframe.mapInPandas(..., profile=...)` to set resource profile.
.rdd.barrier()
.mapPartitions(lambda x: x)
)
Expand Down Expand Up @@ -1384,6 +1388,8 @@ def _run_on_gpu(self) -> bool:

use_gpu_by_params = super()._run_on_gpu()

# TODO: To support spark connect, we can't use any SparkContext APIs,
# and we can't read any spark configurations. Remove them
if _is_local(_get_spark_session().sparkContext):
# if it's local model, no need to check the spark configurations
return use_gpu_by_params
Expand Down
Loading