dmlc / xgboost

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow
https://xgboost.readthedocs.io/en/stable/
Apache License 2.0
26.3k stars 8.73k forks source link

dmlc parameter failed to parse small value. #7939

Open trivialfis opened 2 years ago

trivialfis commented 2 years ago

Falsifying example: test_hist( param={'alpha': 0.0, 'colsample_bylevel': 1.0, 'colsample_bytree': 1.0, 'eta': 0.25, 'gamma': 1.1754943552013452e-38, 'lambda': 1.0, 'max_depth': 1, 'min_child_weight': 1.0, 'nthread': 1, 'seed': 0}, hist_param={'grow_policy': 'lossguide', 'max_bin': 2, 'max_depth': 1, 'max_leaves': 0}, num_rounds=1, dataset=calif_housing, self=<test_updaters.TestTreeMethod at 0x7f84b3093f90>, )

Found in the tests of https://github.com/dmlc/xgboost/pull/7937 .

hcho3 commented 2 years ago

@trivialfis Should we pin hypothesis to <6.46.8 to unblock PRs?

trivialfis commented 2 years ago

@hcho3 We can workaround it by using values like 1e-5 in the place of 0 as done in the linked PR. In longer term I think we need to fix it inside XGBoost (by replacing float with double or by other means).