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

fix: redundant row updates with no Task id in text_labels table #876

Merged
merged 4 commits into from Jan 22, 2023

Conversation

melvinebenezer
Copy link
Collaborator

For every report from the frontend , a new entry was created in text_label table.

Solution

  • Update existing record based on message_id iff there is no Task ID associated to it
  • create new row if none exists
  • Outer Commit function in API handler

Dependency

Test Evidence

First Update
Screenshot 2023-01-18 at 11 01 17 AM

Second Update
Screenshot 2023-01-18 at 11 00 47 AM

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.

The overall logic looks right, left some comments.

backend/oasst_backend/api/v1/text_labels.py Show resolved Hide resolved
backend/oasst_backend/prompt_repository.py Outdated Show resolved Hide resolved
backend/oasst_backend/prompt_repository.py Outdated Show resolved Hide resolved
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.

suggested some changes.

backend/oasst_backend/prompt_repository.py Outdated Show resolved Hide resolved
backend/oasst_backend/api/v1/text_labels.py Outdated Show resolved Hide resolved
backend/oasst_backend/api/v1/text_labels.py Outdated Show resolved Hide resolved
backend/oasst_backend/api/v1/text_labels.py Outdated Show resolved Hide resolved
backend/oasst_backend/api/v1/text_labels.py Show resolved Hide resolved
backend/oasst_backend/prompt_repository.py Outdated Show resolved Hide resolved
backend/oasst_backend/prompt_repository.py Outdated Show resolved Hide resolved
@melvinebenezer melvinebenezer marked this pull request as ready for review January 22, 2023 09:06
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.

fine :-)

@andreaskoepf andreaskoepf merged commit c0391a6 into LAION-AI:main Jan 22, 2023
@melvinebenezer melvinebenezer deleted the 519_redundant_updates_2 branch January 22, 2023 11:04
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.

None yet

3 participants