Add an asynchronous wrapper (EmotionDetectorAsync)

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
64/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
fastapi, python

Research direction

Start by reading the detector’s existing synchronous API and its ONNX inference entry point; the issue does not name files or tests, so locate them in the package first. Add an asynchronous wrapper named EmotionDetectorAsync that runs inference through asyncio.to_thread, then check that it works without blocking an async event loop.

Written by the indexing model from the issue text.

Description

enhancement help wanted

For high-performance web frameworks like FastAPI, having an async wrapper for the detector would prevent blocking the main event loop.

We can use asyncio.to_thread under the hood to run the ONNX inference without blocking, allowing ERML to be used seamlessly in async web servers.

Dominant language
Python
Stars
1
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sid-lakhani/erml

All issues in sid-lakhani/erml

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.