cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

I have a single node XGBoost model written in Python. How can I scale it with Spark?

User16788317454
New Contributor III
 
1 ACCEPTED SOLUTION

Accepted Solutions

j_weaver
New Contributor III

If you are talking about distributed training of a single XGBoost model, there is no built-in capability in SparkML. SparkML supports gradient boosted trees, but not XGBoost specifically. However, there are 3rd party packages, such as XGBoost4J that you can use. Currently, there is no Python API for it, but you can access it via Scala/Java. See the Databricks docs for a more complete example.

If you want to scale the hyperparameter tuning, you can use HyperOpt with single node XGBoost models in Python, or you can always do distributed inference via a Spark UDF.

View solution in original post

1 REPLY 1

j_weaver
New Contributor III

If you are talking about distributed training of a single XGBoost model, there is no built-in capability in SparkML. SparkML supports gradient boosted trees, but not XGBoost specifically. However, there are 3rd party packages, such as XGBoost4J that you can use. Currently, there is no Python API for it, but you can access it via Scala/Java. See the Databricks docs for a more complete example.

If you want to scale the hyperparameter tuning, you can use HyperOpt with single node XGBoost models in Python, or you can always do distributed inference via a Spark UDF.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group