fix: route List[Path] outputs through FileOutput IPC for upload#2779
Merged
tempusfrangit merged 4 commits intomainfrom Feb 28, 2026
Merged
fix: route List[Path] outputs through FileOutput IPC for upload#2779tempusfrangit merged 4 commits intomainfrom
tempusfrangit merged 4 commits intomainfrom
Conversation
Member
Author
|
This has been confirmed to be resolved via E2E test on replicate with a real published model. |
When a predict function returns List[Path] (not an iterator), the list was being processed by output::process_output which base64-encodes Path objects inline. This caused multi-megabyte data URIs in the response instead of uploaded URLs. Now process_single_output detects list/tuple returns and iterates their items through send_output_item, which routes Path objects through the FileOutput IPC path for proper upload. Adds coglet_list_path_upload_url integration test to verify List[Path] outputs are uploaded via --upload-url and not base64-encoded.
…t List[Path]
Single-element List[Path] returns were collapsed to a scalar string instead
of a one-element array, breaking the API contract. The orchestrator now
checks the schema's Output type ("type": "array") to decide Single vs
Stream wrapping. For Any/missing schemas, a predictor-side is_stream flag
on the Done message serves as fallback.
- Add wrap_outputs() helper with schema + predictor signal priority
- Propagate is_stream through PredictionOutcome -> worker -> Done IPC
- 13 unit tests covering all wrapping combinations + serde round-trip
- Integration tests for List[Path] single-element and scalar Path output
5a5cdef to
7e7b189
Compare
michaeldwan
approved these changes
Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
List[Path](not an iterator), the list was processed byoutput::process_outputwhich base64-encodesPathobjects inline, producing multi-megabyte data URIs in the response instead of uploaded URLsprocess_single_outputnow detects list/tuple returns and iterates their items throughsend_output_item, which routesPathobjects through the FileOutput IPC path for proper upload via--upload-urlTesting
coglet_list_path_upload_urlverifiesList[Path]outputs are uploaded and returned as URLs, not data URIscoglet_iterator_upload_urltest still passes (Iterator[Path] path unaffected)closes: #2777