-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
one server, multiple sessions (users) ((feature request)) #58
Comments
This is related to #13 (who asked the opposite). As it is now, the state implementation is indeed poor, as it neither completely remembers or completely forgets the state when the web ui is opened in another tab. |
This issue has been closed due to inactivity for 30 days. If you believe it is still relevant, you can reopen it (if you are the author) or leave a comment below. |
I believe it is still a valid enhancement request. I am aware that I could try building my own platform and use textgen webui only as inference, but I'd love to see it as a built in feature as well. Can @oobabooga reopen it? I might be blind but I can't see where to do it. |
FWIW, I'm not able to run multiple instances on different ports; when I try, the second instance kills with no error message: (with one instance already running)
Could it be as easy as changing some command line parameters, or somehow isolating the instances in Docker containers? (See #174) |
I am perfectly able to run several instances using docker, so that is something you can try too. |
But wouldn't that result in multiple instance being loaded at the same time, therefore requiring more resources? What I'm asking here is the possibility for multiple users to interact with the same, loaded model. |
Yes, it's not efficient for a multi user setup, I was just commenting on the general idea by the guy above me |
I'm also interested in this enhancement - it seems like we need to apply a session state to the gradio-web ui according to gradio documentation
|
I think this would also involve sending incoming generate_reply calls (requests for text generation) to a queue to be processed by a background worker, which can then schedule them for execution so no conflicts from multiple requests at the same time. Unless I'm reading the code wrong and it already works like that |
forgive my boldness. Is it possible to just change shared.history to something like shared.history[user_id] to support this? So that the historys are seperate. |
I am about to write advanced API to process multi-users (not UI though). Will revert. |
Since the code uses gradio Blocks, what we want is this: https://gradio.app/state-in-blocks/ I'm taking a crack at it. |
Hi All, I would like to know if there is any progress on this request. Would love to know if we have any parameter available for state management |
+1 |
@flurb18 good luck! I think the difficulty here is there the shared parameters are all over the places. If you want to support multiple users, you need to give each of them a gradio State object for a history, but make sure that for each button press (generate, submit, w/e) you 1. pass your state to the callback and 2. follow the callback all the way down to see that the shared one is not used in any later point.. I tried something like this, with partial success and it is quite messy.. I'm hoping there's a simpler solution out there.. |
Could we put a little more priority on this feature? CC @oobabooga |
Hi, I made a draft PR here. I agree @OrenRele and @jinluyang's opinions cause the project is using shared object. |
See here #2573 (comment), it seems to me that this should already work, but it would be good to have someone actually test it with multiple users Just launch the ui in chat mode with |
Anyone can confirm it works yet? |
WebUI works, API works but only one user at a time due to no batched inferencing. Everybody has to queue. |
This doesn't save the history right? |
How it works? I try in incognito and default still the Web UI shows the same prompt? |
This issue has been closed due to inactivity for 6 weeks. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment. |
Chiming in that I'd be really interested to see this, even in a basic form so two or three people can use the service but only see their own prompts. |
Hey guys,
First of all, thanks a bunch for working on this project, I'm following closely. Hoping I can contribute with something one day.
My question is: Is there a way to run non-shared sessions using a single instance? When I shared my instance on the local network, chat-history was present on multiple computers at a point, they were both using the same character.
I suppose the most obvious technical challenge would be the fast-switch of context and history especially if two users are talking to two different characters.
Thank you!
The text was updated successfully, but these errors were encountered: