Conversation
yangw-dev
commented
Aug 22, 2025
Collaborator
Author
|
@S1ro1 but feel free to start the server and run this with the database: the trigger the api: |
Collaborator
Author
|
i setup this queue process due to the time limit, it's not perfect, but due to the time limit, i put it here: In long term we should consider options:
|
yangw-dev
commented
Aug 24, 2025
yangw-dev
commented
Aug 24, 2025
S1ro1
reviewed
Aug 25, 2025
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||
S1ro1
approved these changes
Aug 27, 2025
Member
S1ro1
left a comment
There was a problem hiding this comment.
Not 100% happy with the complexity it adds, but if it works we can always fix it later (we never do). Tested locally with CLI, works just fine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add an API serve for website gpumode, the api will return sub_id and sub_job_status_id immediately after the job is enqueue with background manager, then pull the data periodically for the update.
Adding queue mechnism to accept run jobs from api request /submission/ and runs the backend job.
the gpumode can then pull the db table to consistently check the status of the submission run.
Why not fastapi background task?
https://fastapi.tiangolo.com/tutorial/background-tasks/
The fastapi background task is ok to use when the background job is <=30 secs such as sending emails, notificaiton. For us, it's not ideal since it uses same event loop.
Long term
Ideally we should handle submission jobs as background jobs using RQ or celery, but due to the time limit, this is a compromise solution. Some improvement can be done in next prs:
Or we should change the way we interact with the github runner, instead of keeping listening, we should provide a hook to let the workflow trigger the important update includes upload the result
Checklist
Before submitting this PR, ensure the following steps have been completed:
/verifyrunson your own server./verifyruns.runs may take a little longer. The Modal run is typically quick.)
For more information on running a cluster bot on your own server, see
README.md.