Skip to content

Conversation

@myungjin
Copy link
Contributor

@myungjin myungjin commented Jan 9, 2026

Description

stage's predict function is a blocking call, which blocks the asyncio event loop from scheduling other tasks. This means that during the stage execution, no other asyncio tasks (such as sending and receiving tensors) are scheduled. To address this issue, we run stage in asyncio.to_thread.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

stage's predict function is a blocking call, which blocks the asyncio
event loop from scheduling other tasks. This means that during the stage
execution, no other asyncio tasks (such as sending and receiving tensors)
are scheduled. To address this issue, we run stage in asyncio.to_thread.
@myungjin myungjin merged commit 93e28fa into cisco-open:main Jan 9, 2026
1 check passed
@myungjin myungjin deleted the stage_in_asyncio branch January 9, 2026 23:47
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.

1 participant