[breaking] Bump Python requirement to 3.10. (#10434)
- Bump the Python requirement. - Fix type hints. - Use loky to avoid deadlock. - Workaround cupy-numpy compatibility issue on Windows caused by the `safe` casting rule. - Simplify the repartitioning logic to avoid dask errors.
This commit is contained in:
@@ -106,8 +106,8 @@ plt.figure(figsize=(12, 13))
|
||||
bst = xgb.train(
|
||||
params,
|
||||
dmat,
|
||||
15,
|
||||
[(dmat, "train")],
|
||||
num_boost_round=15,
|
||||
evals=[(dmat, "train")],
|
||||
evals_result=res,
|
||||
callbacks=[PlotIntermediateModel()],
|
||||
)
|
||||
|
||||
@@ -42,7 +42,7 @@ class IterForDMatrixDemo(xgboost.core.DataIter):
|
||||
"""
|
||||
self.rows = ROWS_PER_BATCH
|
||||
self.cols = COLS
|
||||
rng = cupy.random.RandomState(1994)
|
||||
rng = cupy.random.RandomState(numpy.uint64(1994))
|
||||
self._data = [rng.randn(self.rows, self.cols)] * BATCHES
|
||||
self._labels = [rng.randn(self.rows)] * BATCHES
|
||||
self._weights = [rng.uniform(size=self.rows)] * BATCHES
|
||||
|
||||
@@ -8,7 +8,7 @@ This directory contains a demo of Horizontal Federated Learning using
|
||||
To run the demo, first build XGBoost with the federated learning plugin enabled (see the
|
||||
[README](../../../plugin/federated/README.md)).
|
||||
|
||||
Install NVFlare (note that currently NVFlare only supports Python 3.8):
|
||||
Install NVFlare:
|
||||
```shell
|
||||
pip install nvflare
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ This directory contains a demo of Vertical Federated Learning using
|
||||
To run the demo, first build XGBoost with the federated learning plugin enabled (see the
|
||||
[README](../../../plugin/federated/README.md)).
|
||||
|
||||
Install NVFlare (note that currently NVFlare only supports Python 3.8):
|
||||
Install NVFlare:
|
||||
```shell
|
||||
pip install nvflare
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user