Skip to content

Fix remote scorer serialization for attachment inputs - #779

Open
Pedro Mora (stretpjc) wants to merge 1 commit into
mainfrom
pylon-21483
Open

Pedro Mora (stretpjc) wants to merge 1 commit into
mainfrom
pylon-21483

Conversation

@stretpjc

Copy link
Copy Markdown
Contributor

Linear SDK-390

Remote evals fail when a playground-selected scorer receives dataset input containing a PDF attachment. Dataset rows hydrate attachment references into ReadonlyAttachment objects, but the dev server was passing the scorer request
through requests using json=, which relies on the standard JSON encoder.

This produced:
TypeError: Object of type ReadonlyAttachment is not JSON serializable
image

Changes

  • serializes remote scorer requests with bt_dumps()
  • sends the encoded UTF-8 body through data=
  • sets Content-Type: application/json
  • adds regression coverage confirming that ReadonlyAttachment is serialized
  • as its attachment reference

Tested locally, with this change the error does not recur and there is a scorer in the UI:
Screenshot 2026-09-17 at 3 24 42 PM

Screenshot 2026-09-17 at 3 25 20 PM

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-17T20:28:26.828253Z 46d1498 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant