-
Notifications
You must be signed in to change notification settings - Fork 77
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
[Question] Automatically 'close' assignments with multiple units after some time if missing agents #483
Comments
Hi @federicoruggeri, I'm not fully sure what the circumstances would be that this feature would be used, but the reason why the backend doesn't update is because there is no world running - we only launch the world for a dialogue task once everyone has connected: Mephisto/mephisto/operations/supervisor.py Lines 464 to 484 in c571bf9
As far as an implementation that would allow this functionality, I'm unclear how to do this cleanly. |
Many thanks for the very quick reply! It makes sense. Please, correct me if I'm saying something wrong :D |
Hm, after a certain timeout, for synchronized (live) tasks, the first Likely, we're not triggering this function correctly:
If the socket isn't disconnecting and sending the close error, we'd need to find a way to catch that here instead (as a ping to a disconnected agent would fail):
Unfortunately until I get a chance to add a local view for heroku logs, I don't imagine this to be an easy thing to debug. |
Many thanks for the clear explanation! Do you remember where the timeout is defined? I would like to check how many seconds does the system wait before returning the unit back into the pool. Thanks in advance. |
The timeout I believe should be around 15 seconds. I added a change in #489 that should cause this to trigger more consistently. |
Closing for now, please feel free to reopen the issue if there are any further questions. |
Let's consider a task where each assignment has multiple units (e.g. dialogue task).
I was wondering if it is possible (and what is the best possible way) to automatically mark an assignment as incomplete (or expired), after some time if not all units have been assigned to an agent.
An example to clarify:
task -> dialogue task
assignments -> [1, 2]
units -> [1, 2, 3, 4]
agent_1 connects and gets assigned to assignment_1, unit_1. After X minutes, none has connected to the application and agent_1 is the only one in assignment_1.
I would like to have a timeout that, once expired, marks unit_1 and unit_2 (assignment_1) as expired.
Q1: is it possible?
Q2: what's the best way?
My attempt so far (dialogue task template): I've set a timeout (front-end side, react) that marks episode_done (using onMessageSend). Everything seems fine front-end side (the client gets disconnected, the interface gets updated, etc..). However, it seems like nothing is happening to update the database state of the unit. It seems like something is not running since some worker has still to connect to the assignment.
Am I missing something?
I hope that the description is sufficiently clear.
Thanks in advance!
The text was updated successfully, but these errors were encountered: