Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Get dask-gateway scheduler address #55

Open
AlbertDeFusco opened this issue Oct 8, 2019 · 2 comments
Open

Get dask-gateway scheduler address #55

AlbertDeFusco opened this issue Oct 8, 2019 · 2 comments

Comments

@AlbertDeFusco
Copy link

When connecting to a dask-gateway the client.scheduler_address is a proxy address

>>>client.scheduler.address
'gateway://dask.training.anaconda.com:8786/4fd53916f0214703934701aa7a7eaf85'

I was able to solve this with the following in core::_train with client.scheduler_info()['address'])

    # Start the XGBoost tracker on the Dask scheduler
    host, port = parse_host_port(client.scheduler_info()['address'])
    env = yield client._run_on_scheduler(
        start_tracker, host.strip("/:"), len(worker_map)
    )

However, I get the following warning.

>>> from dask_xgboost import XGBRegressor
>>> xgb = XGBRegressor()
>>> xgb.fit(X, y)

/Users/adefusco/Applications/miniconda3/envs/xgb/lib/python3.7/site-packages/distributed/client.py:3299: RuntimeWarning: coroutine 'Client._update_scheduler_info' was never awaited
  self.sync(self._update_scheduler_info)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

I have verified that his update works correctly on a 9m row training set and scales linearly from 4 to 8 workers (2cores/worker). Is this the correct approach to get the actual scheduler address?

@TomAugspurger
Copy link
Member

I'll look into this soon. I'm planning a refactor to move this logic into distributed itself.

@jrdzha
Copy link

jrdzha commented Nov 12, 2020

Hi, is there any update on this issue? I'm using the Dask implementation in XGBoost itself, rather than this library, so my feeling is this may be a bug with Dask rather than XGBoost?

I'm using LocalCluster with Dask 2.28.0.

dtrain = xgb.dask.DaskDMatrix(client, X, y)

output = xgb.dask.train(
    client,
    {
        'verbosity': 2,
         'tree_method': 'hist',
         'objective': 'binary:logistic'
    },
    dtrain,
    num_boost_round=4, 
    evals=[(dtrain, 'train')]
)

/root/anaconda3/lib/python3.7/site-packages/distributed/client.py:3530: RuntimeWarning: coroutine 'Client._update_scheduler_info' was never awaited
  self.sync(self._update_scheduler_info)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants