Skip to content

fix: update asyncio_reduce example to the current reducer API (Fixes #338) - #390

Merged
vigith merged 1 commit into
numaproj:mainfrom
atishay-kasliwal:fix/338-asyncio-reduce-example
Nov 12, 2026
Merged

vigith merged 1 commit into
numaproj:mainfrom
atishay-kasliwal:fix/338-asyncio-reduce-example

Conversation

@atishay-kasliwal

Copy link
Copy Markdown
Contributor

Fixes #338

Both scripts used AsyncReducer and aiorun, which no longer exist. They now use ReduceAsyncServer, and the executor version is a Reducer that gets its pool through init_args. I also fixed the Dockerfile, which ran a missing example.py, added requests as a dependency, and added the example to the image build matrix as the TODO there asked.

Tested: built the image and ran both scripts in it, sending 10 reduce requests over gRPC each time, with a local server answering the pings on host.docker.internal:9888. Also ran executorpool.py locally with EXEC_TYPE set to thread, process and unset.

Both scripts used AsyncReducer and aiorun, which are gone. Move them to
ReduceAsyncServer, make the executor handler a Reducer that uses its own
pool, and stop reading the event loop before one is running. The
Dockerfile ran a missing example.py, and requests was not a dependency.
Add the example to the image build matrix, as the TODO there asked.

Fixes numaproj#338

Signed-off-by: Atishay Kasliwal <katishay@gmail.com>
@vigith
vigith merged commit 58cb476 into numaproj:main Nov 12, 2026
2 checks passed
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.

Update asyncio_reduce example

3 participants