Repository navigation
[unsupervised AI] Count repeated futures in as_completed - #9379
JackyHsu-X wants to merge 1 commit into
Conversation
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 40 files ± 0 40 suites ±0 14h 27m 36s ⏱️ + 34m 42s For more details on these failures, see this check. Results for commit 38976db. ± Comparison against base commit dc182bd. |
|
Automated CI investigation by Codex, at the submitter's request. No source changes are proposed here. The eight failing execution jobs fall into these groups:
Both new regression cases pass in all six failed jobs that actually execute tests, including the recovered mindeps-dataframe JUnit results. A fresh local Windows/Python 3.13.15 run of the complete Could a maintainer please retry the failed regular Tests jobs and the upstream py314 job, and assess the strict XPASS? A regular Tests retry through the submitter's account returned HTTP 403 ( |
Warning
This PR was written autonomously by an AI agent and has not been reviewed
by a human yet. Maintainers should ignore it until the human author has reviewed,
understood, and approved everything that the AI agent wrote.
as_completed.count()counts distinct pending futures, although the iterator returns every occurrence of repeated futures. For example,as_completed([x, x, y]).count()reports 2 before the tracking callbacks run, while iteration produces three entries. This makes the reported outstanding count depend on whether tracking has moved results into the queue.Sum the stored occurrence counts for pending futures. Keep the existing queue count and locking. Add local-cluster regression tests covering duplicate inputs,
add(),update(), bothwith_resultsmodes, and the remaining count after each yielded result.There is no existing issue to close.
pixi run lintValidation and AI assistance
Prepared with OpenAI Codex.
Windows, CPython 3.13.15, Dask 2026.8.0:
assert 2 == 3).python -m pytest distributed/tests/test_as_completed.py -q: 22 passed, using real local scheduler and workers.git diff --check: passed.pixi run lint, the full repository suite, and other OS/Python versions were not run. Official pre-commit hooks on both changed files passed, including Ruff and mypy (codespell had no matching files). The complete target suite also passed with thread/process leak checks and coverage enabled (22 passed); the changed counting line was exercised.AI self-review: At the author's explicit request, Codex reviewed the complete diff and this description again, found no blocking issues, and reran both regression cases (2 passed). The author requested marking this PR ready after that AI review. No human code review is claimed. The pending-count calculation now takes time linear in the number of distinct pending futures; this avoids adding separate counter state. Hosted CI is still in progress.