Skip to content

Commit

Permalink
add barrier before creating quantile dmatrix
Browse files Browse the repository at this point in the history
  • Loading branch information
wbo4958 committed May 30, 2024
1 parent e414c2c commit b01c8e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python-package/xgboost/spark/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ def split_params() -> Tuple[Dict[str, Any], Dict[str, Union[int, float, bool]]]:
end = time.time()
get_logger("XGBoost-PySpark").warning("cache_partitions takes {} seconds".format(round(end - start, 2)))

from pyspark import BarrierTaskContext
context = BarrierTaskContext.get()
context.barrier()

start = time.time()
if feature_cols is not None and use_qdm:
dtrain: DMatrix = make_qdm(train_data, dev_ordinal, meta, None, params)
Expand Down

0 comments on commit b01c8e2

Please sign in to comment.