Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Jad2192 update xgb (#4)
Browse files Browse the repository at this point in the history
* update xgb to 1.5.2 in testing

* add `allowNonZeroForMissing`

* update version
  • Loading branch information
jad2192 authored Aug 26, 2022
1 parent 567038e commit 299a54b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Spark users can use XGBoost for classification and regression tasks in a distrib

This repository contains the Python wrapper components from that PR. By building and installing the appropriate .whl (see 'releases' in this repository), PySpark users can directly use this wrapper with the XGBoost library.

Tested with XGBoost 1.3.1
Tested with XGBoost 1.5.2

See the notebook in `/examples` for a practical illustration of usage.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

setup(
name='spark-xgboost',
version='0.90.2',
version='1.0.0',
description='spark-xgboost is the PySpark package for XGBoost',

long_description=long_description,
Expand Down
2 changes: 1 addition & 1 deletion sparkxgb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
from sparkxgb.xgboost import XGBoostClassifier, XGBoostRegressor, XGBoostClassificationModel, XGBoostRegressionModel

__all__ = ["XGBoostClassifier", "XGBoostRegressor", "XGBoostClassificationModel", "XGBoostRegressionModel"]
__version__ = "0.90"
__version__ = "1.0.0"
2 changes: 1 addition & 1 deletion sparkxgb/testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def default_session(conf=None):
spark_major_version = pyspark.__version__[0]
scala_version = SPARK_SCALA_MAPPING[spark_major_version]
mvn_group = "ml.dmlc"
xgb_version = "1.3.1"
xgb_version = "1.5.2"
xgboost4j_coords = f"{mvn_group}:xgboost4j_{scala_version}:{xgb_version}"
xgboost4j_spark_coords = f"{mvn_group}:xgboost4j-spark_{scala_version}:{xgb_version}"

Expand Down
3 changes: 2 additions & 1 deletion sparkxgb/tests/classifier_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def test_binary_classifier_args(self):
objective="binary:logistic",
numRound=5,
numWorkers=2,
killSparkContextOnWorkerFailure=False
killSparkContextOnWorkerFailure=False,
allowNonZeroForMissing=True,
)

xgb = (
Expand Down
4 changes: 4 additions & 0 deletions sparkxgb/xgboost.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class XGBoostClassifier(XGboostEstimator):

@keyword_only
def __init__(self,
allowNonZeroForMissing=False,
alpha=0.0,
baseMarginCol=None,
baseScore=0.5,
Expand Down Expand Up @@ -91,6 +92,7 @@ def __init__(self,

@keyword_only
def setParams(self,
allowNonZeroForMissing=False,
alpha=0.0,
baseMarginCol=None,
baseScore=0.5,
Expand Down Expand Up @@ -180,6 +182,7 @@ class XGBoostRegressor(XGboostEstimator):

@keyword_only
def __init__(self,
allowNonZeroForMissing=False,
alpha=0.0,
baseMarginCol=None,
baseScore=0.5,
Expand Down Expand Up @@ -247,6 +250,7 @@ def __init__(self,

@keyword_only
def setParams(self,
allowNonZeroForMissing=False,
alpha=0.0,
baseMarginCol=None,
baseScore=0.5,
Expand Down

0 comments on commit 299a54b

Please sign in to comment.