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

Update Queue API, documentation #2026

Merged
merged 7 commits into from
Aug 17, 2022
Merged

Conversation

aliabid94
Copy link
Collaborator

Made Queue API a little clearer, added docstrings and documentation to site. Remove print statements. Improved estimation logic (no need to store duration history as a list)

gradio/event_queue.py Outdated Show resolved Hide resolved
@abidlabs
Copy link
Member

Small nits, but overall LGTM! Very clean

Copy link
Contributor

@omerXfaruq omerXfaruq left a comment

Choose a reason for hiding this comment

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

Documentation and naming for queue function is miles ahead of mine congrats 🎉
The only point I could make is since we change duration history total and count and calculation why don't we take the average or calculate estimations function index by function index, there was an issue around it and could be great if you want to handle it right now which would make our etas more precise.

@omerXfaruq
Copy link
Contributor

By the way if we don't use last x number of durations for calculating ETA the calculation could get ugly when the queue size gets very big because when the queue size is Big there's a lot of communication going on which will slow the processes of events.

@aliabid94
Copy link
Collaborator Author

Let's bring in function specific ETA's later.

@aliabid94
Copy link
Collaborator Author

By the way if we don't use last x number of durations for calculating ETA the calculation could get ugly when the queue size gets very big because when the queue size is Big there's a lot of communication going on which will slow the processes of events.

I don't understand why things would be any different with "last x" calculation?

@aliabid94 aliabid94 merged commit 8c2ab97 into release-new-queue-beta Aug 17, 2022
@aliabid94 aliabid94 deleted the queue_updates branch August 17, 2022 18:12
aliabid94 added a commit that referenced this pull request Aug 17, 2022
* queue-refactor-backend (#1489)

* queue-refactor-backend

- create a template for the new design

* queue-refactor-backend

- clean after the old queue

* queue-refactor-backend

- add basic test to websocket endpoint

* queue-refactor-backend

- small fix

* queue-refactor-backend

- debugs&fixes&finalizations
- test the flow with postman

* queue-refactor-backend

- tweaks on websocket closing

* queue-refactor-backend

- cleanup

* queue-refactor-backend

- cleanup & tweaks

* queue-refactor-backend

- cleanup & tweaks

* queue-refactor-backend

- cleanup & tweaks
- correct the exception handling

* queue-refactor-backend

- add websockets dependency

* queue-refactor-backend
- reformat

* queue-refactor-backend
- add single event test

* queue-refactor-backend
- tweaks
- remove outdated tests

* queue-refactor-backend
- reformat

* queue-refactor-backend
- reformat

* queue-refactor-backend
- reformat

* queue-refactor-backend
- add Queue configurations to Blocks.launch()
- add live_queue_update to send estimations whenever a job gets fetched from the Queue

* queue-refactor-backend
- add Queue configurations to Blocks.launch()
- add live_queue_update to send estimations whenever a job gets fetched from the Queue

* queue-refactor-backend
- tweaks

* queue-refactor-backend
- make SLEEP_WHEN_FREE shorter

Co-authored-by: Ali Abid <aabid94@gmail.com>

* Add estimation parameters to queue (#1889)

* - tweaks on Estimation

* version

* Revert "version"

This reverts commit bd1f4d7.

* some fix and tweaks

* implement queue frontend (#1950)

* implement queue frontend

* fix types

* fix ws endpoint in build mode

* cleanup

* Queue tweaks (#1909)

* tweaks on estimation payload

* Queue keep ws connections open (#1910)

* 1. keep ws connections open after the event process is completed
2. do not send estimations periodically if live queue updates is open

* fix calculation

* 1. tweaks on event_queue

* fix issue - create new ws for each request

* format

* fix

* fix tests

* fix tests

* tets

* test

* changes

* changes

* changes

* change'

* wtf

* changes

* changes

* file perms

* Release queue beta v1 (#1971)

* - release the new queue

* - bypass the issue in the tests
- rewrite the lost part in the codebase

* - add concurrent queue example (#1978)

* rank_eta calc

* Queue fixes (#1981)

* change

* format

* - comment out queue tests as they dont work well

* - reformat

* Update gradio/event_queue.py

Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>

* changes

* changes

* change

* weird fix

Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>

* release-queue-v3 (#1988)

* Fix frontend queuing to target secure WSS (#1996)

* change

* format

* changes

* queue-concurrency-tweaks (#2002)

1. make gather_data and broadcast_estimation sequential instead of concurrent because they were deleting elements at the same time and raising expections which was lowering the performance

* Update Queue API, documentation (#2026)

* changes

* changes

* fixes

* changes

* change

* fix

Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>
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.

None yet

3 participants