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

flaky test: test.scheduler_bokeh.test_compute_per_key #7135

Closed
wence- opened this issue Oct 13, 2022 · 0 comments · Fixed by #7136
Closed

flaky test: test.scheduler_bokeh.test_compute_per_key #7135

wence- opened this issue Oct 13, 2022 · 0 comments · Fixed by #7136

Comments

@wence-
Copy link
Contributor

wence- commented Oct 13, 2022

e.g. https://github.com/dask/distributed/actions/runs/3153529773/jobs/5130108657 and https://github.com/dask/distributed/actions/runs/3241463745/jobs/5313437018

Backtrace:

____________________________ test_compute_per_key _____________________________
c = <Client: No scheduler connected>
s = <Scheduler 'tcp://127.0.0.1:60697', workers: 0, cores: 0, tasks: 0>
a = <Worker 'tcp://127.0.0.1:60698', name: 0, status: closed, stored: 0, running: 0/1, ready: 0, comm: 0, waiting: 0>
b = <Worker 'tcp://127.0.0.1:60700', name: 1, status: closed, stored: 0, running: 0/2, ready: 0, comm: 0, waiting: 0>
    @gen_cluster(client=True, scheduler_kwargs={"dashboard": True})
    async def test_compute_per_key(c, s, a, b):
        mbk = ComputePerKey(s)
        da = pytest.importorskip("dask.array")
        x = (da.ones((20, 20), chunks=(10, 10)) + 1).persist(optimize_graph=False)
        await x
        y = await dask.delayed(inc)(1).persist()
        z = (x + x.T) - x.mean(axis=0)
        await c.compute(z.sum())
        mbk.update()
        http_client = AsyncHTTPClient()
        response = await http_client.fetch(
            "http://localhost:%d/individual-compute-time-per-key" % s.http_server.port
        )
        assert response.code == 200
>       assert ("sum-aggregate") in mbk.compute_source.data["names"]
E       AssertionError: assert 'sum-aggregate' in ['add', 'mean_chunk', 'sum', 'mean_agg-aggregate', 'ones_like']

Pretty sure this failed assertion "correct" in that z.sum() is dropped after the call to c.compute() completes, so there's no need for the workers to keep it live.

wence- added a commit to wence-/distributed that referenced this issue Oct 13, 2022
Since we are checking for the presence of z.sum() in the known keys in
the dashboard we need to make sure it doesn't get collected. Fixes dask#7135.
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 a pull request may close this issue.

1 participant