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

Implement task selection #383

Merged
merged 6 commits into from
Jan 5, 2023
Merged

Conversation

MattAlexMiracle
Copy link
Collaborator

This implements a simple self-stabilizing task selection system:

  • ranking
  • answering
  • prompting
  • voting

The goal of the algorithm task_selection is to balance prompting vs voting, such that the number of active prompts stays constant.
Further, we try to get tasks done as soon as possible, meaning that in the case a prompt is ready for ranking, we will preferentially (with probability p) rank first.

If the algorithm decides to "answer" a prompt, a second function next_answer_task exists that, given a dictionary of prompt-ids and existing number of answers, decides which prompt to provide an answer to next.
This also prefers close-to-done prompts so that we can start ranking quickly.

If the selected task doesn't exist (i.e. there are no prompts to answer) I would just re-sample which task to choose at the moment (though with the automatic balancing I'm not entirely sure whether this is even possible).

Copy link
Collaborator

@andreaskoepf andreaskoepf left a comment

Choose a reason for hiding this comment

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

very nice, thank you!

@andreaskoepf andreaskoepf merged commit 3dbe0ae into LAION-AI:main Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants