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

perf: don't use 2 threads to create FastAPI server #2592

Merged

Conversation

zyzniewski-reef
Copy link
Contributor

Description of the Change

Looks like FastAPIThreadedServer.start is launching 2 threads to start FastAPI/uvicorn server with no real reason.

Quantitative Performance Benefits

No performance tests were run - it's a simple design change.

Possible Drawbacks

None?

Verification Process

Created unittest. Ran Axon and checked FastAPI is listening in accepting requests.

Release Notes

  • Improve Axon's resource management

tests/unit_tests/test_axon.py Outdated Show resolved Hide resolved
bittensor/core/axon.py Outdated Show resolved Hide resolved
@zyzniewski-reef zyzniewski-reef force-pushed the perf/creating_fastapi_server branch 2 times, most recently from 4727724 to bc49250 Compare January 21, 2025 13:07
Copy link
Contributor

@thewhaleking thewhaleking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great catch!

@thewhaleking thewhaleking merged commit 1b6c0e8 into opentensor:staging Jan 21, 2025
28 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.

2 participants