• This repository has been archived on 17/Jul/2021
  • Stars
    star
    163
  • Rank 223,617 (Top 5 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created about 7 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dask-XGBoost

Warning

Dask-XGBoost has been deprecated and is no longer maintained. The functionality of this project has been included directly in XGBoost. To use Dask and XGBoost together, please use xgboost.dask instead https://xgboost.readthedocs.io/en/latest/tutorials/dask.html.

Distributed training with XGBoost and Dask.distributed

This repository offers a legacy option to perform distributed training with XGBoost on Dask.array and Dask.dataframe collections.

pip install dask-xgboost

Please note that XGBoost now includes a Dask API as part of its official Python package. That API is independent of dask-xgboost and is now the recommended way to use Dask adn XGBoost together. See the xgb.dask documentation here https://xgboost.readthedocs.io/en/latest/tutorials/dask.html for more details on the new API.

Example

from dask.distributed import Client
client = Client('scheduler-address:8786')  # connect to cluster

import dask.dataframe as dd
df = dd.read_csv('...')  # use dask.dataframe to load and
df_train = ...           # preprocess data
labels_train = ...

import dask_xgboost as dxgb
params = {'objective': 'binary:logistic', ...}  # use normal xgboost params
bst = dxgb.train(client, params, df_train, labels_train)

>>> bst  # Get back normal XGBoost result
<xgboost.core.Booster at ... >

predictions = dxgb.predict(client, bst, data_test)

How this works

For more information on using Dask.dataframe for preprocessing see the Dask.dataframe documentation.

Once you have created suitable data and labels we are ready for distributed training with XGBoost. Every Dask worker sets up an XGBoost slave and gives them enough information to find each other. Then Dask workers hand their in-memory Pandas dataframes to XGBoost (one Dask dataframe is just many Pandas dataframes spread around the memory of many machines). XGBoost handles distributed training on its own without Dask interference. XGBoost then hands back a single xgboost.Booster result object.

Larger Example

For a more serious example see

History

Conversation during development happened at dmlc/xgboost #2032

More Repositories

1

dask

Parallel computing with task scheduling
Python
12,031
star
2

dask-tutorial

Dask tutorial
Jupyter Notebook
1,817
star
3

distributed

A distributed task scheduler for Dask
Python
1,544
star
4

dask-ml

Scalable Machine Learning with Dask
Python
882
star
5

dask-examples

Easy-to-run example notebooks for Dask
Jupyter Notebook
361
star
6

dask-kubernetes

Native Kubernetes integration for Dask
Python
309
star
7

dask-labextension

JupyterLab extension for Dask
TypeScript
306
star
8

dask-searchcv

dask-searchcv is now part of dask-ml: https://github.com/dask/dask-ml
Python
240
star
9

dask-jobqueue

Deploy Dask on job schedulers like PBS, SLURM, and SGE
Python
230
star
10

dask-docker

Docker images for dask
Jupyter Notebook
227
star
11

dask-image

Distributed image processing
Python
199
star
12

hdfs3

A wrapper for libhdfs3 to interact with HDFS from Python
Python
136
star
13

cachey

Caching based on computation time and storage space
Python
134
star
14

dask-cloudprovider

Cloud provider cluster managers for Dask. Supports AWS, Google Cloud Azure and more...
Python
129
star
15

dask-gateway

A multi-tenant server for securely deploying and managing Dask clusters.
Python
128
star
16

dask-ec2

Start a cluster in EC2 for dask.distributed
Python
106
star
17

partd

Concurrent appendable key-value storage
Python
100
star
18

dask-tensorflow

Python
93
star
19

helm-chart

Helm charts for Dask
YAML
89
star
20

dask-lightgbm

Python
78
star
21

dask-expr

Python
77
star
22

dask-glm

Python
75
star
23

dask-yarn

Deploy dask on YARN clusters
Python
69
star
24

zict

Useful Mutable Mappings
Python
68
star
25

dask-gke

kubernetes setup to bootstrap distributed on google container engine
Python
67
star
26

old-dask-examples

Collection of dask example notebooks
Jupyter Notebook
56
star
27

knit

Deprecated, please use https://github.com/jcrist/skein or https://github.com/dask/dask-yarn instead
Python
53
star
28

dask-mpi

Deploy Dask using MPI4Py
Python
49
star
29

dask-drmaa

Deploy Dask on DRMAA clusters
Python
41
star
30

dask-stories

Python
39
star
31

dask-blog

Dask development blog
HTML
30
star
32

crick

Streaming and approximate algorithms. WIP, use at own risk.
Python
21
star
33

community

For general discussion and community planning. Discussion issues welcome.
20
star
34

dask-benchmarks

asv benchmarks for dask projects
Python
17
star
35

pandas-streaming

Python
16
star
36

mtprof

Thread-aware Python profiler hack
Python
16
star
37

dask-tutorial-infrastructure

Cluster for the Dask Tutorial.
Dockerfile
11
star
38

old-dask-yarn

Deprecated, please use https://github.com/jcrist/skein or https://github.com/dask/dask-yarn instead
Python
7
star
39

governance

The governance process and model for Dask
7
star
40

dask-sphinx-theme

Sphinx theme for Dask documentation
Python
6
star
41

dask-ml-benchmarks

Python
5
star
42

dask.github.io

Dask Website
HTML
5
star
43

scipy-tutorials-2018

5
star
44

design-docs

Experimental repo for proposals of future work
2
star
45

.github

2
star
46

dask-org

General dask resources that aren't code
Jupyter Notebook
2
star
47

marketing

Resources and guidelines for marketing Dask
Python
1
star
48

dask-gateway-helm-repo

Repository holding published dask-gateway helm charts
1
star
49

parquet-integration

Integration tests for various parquet readers and writers
Python
1
star