Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove IP lookup from inproc protocol #9010

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jacobtomlinson
Copy link
Member

Closes #8559

When setting LocalCluster(processes=False) Dask uses the inproc protocol to communicate between workers.

During the setup of the inproc protocol it tries to look up the IP address of the machine, which is unnecessary because all communication is inter-process. If you turn off your wifi and try to create it you will get a warning (see #8559).

In [1]: from distributed import LocalCluster
   ...: cluster = LocalCluster(processes=False)
/Users/jtomlinson/miniconda3/envs/dask/lib/python3.11/site-packages/distributed/utils.py:181: RuntimeWarning: Couldn't detect a suitable IP address for reaching '8.8.8.8', defaulting to hostname: [Errno 51] Network is unreachable
  warnings.warn(

This PR skips looking up the IP when using the inproc protocol and just assumes our IP is 127.0.0.1.

  • Tests added / passed
  • Passes pre-commit run --all-files

Copy link
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    27 files  ±0      27 suites  ±0   11h 28m 37s ⏱️ + 6m 27s
 4 120 tests ±0   3 991 ✅  -  2    111 💤 ±0   17 ❌ + 2  1 🔥 ±0 
51 674 runs  ±0  49 233 ✅  - 49  2 296 💤 ±0  138 ❌ +49  7 🔥 ±0 

For more details on these failures and errors, see this check.

Results for commit afa980a. ± Comparison against base commit 55bb639.

@jacobtomlinson
Copy link
Member Author

Some tests are failing because the inproc address isn't matching the IP of the machine. Perhaps I am misunderstanding inproc but like the ip of the machine shouldn't really matter as everything is within a single process, we more just care about having a name.

Does anyone have thoughts on the correct way forward here?

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

Successfully merging this pull request may close these issues.

Warning when opening LocalCluster if not having network access
1 participant