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(weave): Bump feedback payload size limit to 1 MiB #2926

Merged
merged 3 commits into from
Dec 18, 2024

Conversation

adrnswanberg
Copy link
Contributor

Description

(Most likely ;) fixes https://wandb.atlassian.net/issues/WB-21753?jql=reporter%3D%22Adrian%20Swanberg%22%20ORDER%20BY%20created%20DESC

No reason to have the limit as small as it was now that we're using Feedback for all scorers. llm-as-judge feedback in particularly can easily be larger than 1 KiB

Testing

Updated a test.

@adrnswanberg adrnswanberg requested a review from a team as a code owner November 7, 2024 06:52
@circle-job-mirror
Copy link

circle-job-mirror bot commented Nov 7, 2024

@@ -1353,7 +1353,7 @@ def feedback_create(self, req: tsi.FeedbackCreateReq) -> tsi.FeedbackCreateRes:
created_at = datetime.datetime.now(ZoneInfo("UTC"))
# TODO: Any validation on weave_ref?
payload = _dict_value_to_dump(req.payload)
MAX_PAYLOAD = 1024
Copy link
Collaborator

Choose a reason for hiding this comment

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

was the old size constraint arbitrary? Should we enforce this older payload size for older types of feedback?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, pretty arbitrary. I did not have time when developing feedback to analyze what the impact of choosing something larger would be, and it is much easier to increase a limit than decrease one. The larger the limit the more people are tempted to do things like base64 encode images as strings and jam them in there and we know what kind of trouble that can cause. :-) Also worth noting that I believe we don't have per-call limits on number of feedbacks.

If we change this we should also update the docs: https://github.com/wandb/weave/blob/master/docs/docs/guides/tracking/feedback.md?plain=1#L85

We should keep in mind that the grid of feedback in the UI is going to load all of this.

It would be good if a nice error message explaining what was happening was propagated to the user. I don't know if we have any information on how large the user's payloads are or an intuition on the size distribution of scorer output in general. If not, we may want to ratchet this up a little more slowly.

@tssweeney tssweeney merged commit af7e421 into master Dec 18, 2024
116 checks passed
@tssweeney tssweeney deleted the feedback_limit_1mib branch December 18, 2024 01:08
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants