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

Add asyncio support with AsyncComponent #351

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Add asyncio support with AsyncComponent #351

merged 1 commit into from
Dec 18, 2024

Conversation

treo
Copy link
Contributor

@treo treo commented Aug 5, 2024

Description

A couple of libraries have made the move to async execution, using them from within Xircuits is quite cumbersome and error prone at the moment.

This introduces an AsyncComponent that can be used as the parent class which allows execute method to be defined as async.

As a bridge between sync and async we need another dependency: asgiref. It provides @sync_to_async and @async_to_sync.

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Xircuits Project Template
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Copy link

github-actions bot commented Aug 5, 2024

Binder 👈 Launch a binder notebook on branch XpressAI/xircuits/paul/async

@treo treo changed the title WIP: Add asyncio support with AsyncComponent Add asyncio support with AsyncComponent Dec 5, 2024
@MFA-X-AI MFA-X-AI merged commit 5ed979a into master Dec 18, 2024
8 checks passed
@MFA-X-AI MFA-X-AI deleted the paul/async branch December 18, 2024 07:19
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.

2 participants